Commits

factormystic  committed 32447f5

Justify right automatically, even before weather data is loaded

  • Participants
  • Parent commits edd8584

Comments (0)

Files changed (1)

File content.html

 				System.Gadget.Settings.writeString("condition", condition.value);
 				alert("Condition is now: "+condition.value);
 
-				temp.width = temp.offsetWidth;
-				temp.left = 675-temp.width-10;
-				condition.width = condition.offsetWidth;
-				condition.left = 675-condition.width-10;
+				justify_right();
 			}
         }                    
     }
 		alert("HTTP Status: "+xmlHttp.readyState);
 }
 
+function justify_right()
+{
+	temp.width = temp.offsetWidth;
+	temp.left = 675-temp.width-10;
+	condition.width = condition.offsetWidth;
+	condition.left = 675-condition.width-10;
+}
 
 function update()
 {
 		condition.opacity = 30;
 	}
 
+	justify_right();
+
 	setTimeout('update()', 60*1000*5);
 }
 </script>