Commits

factormystic committed 8d062c5

Use variable for text color (will making implementing it as a user pref easier)

  • Participants
  • Parent commits ef35489

Comments (0)

Files changed (1)

File content.html

 var colour = defaultColour;
 var fonttype = System.Gadget.Settings.readString("fonttype");
 var fontSizer;
+var textcolor = "white";
 
 var last_temp = System.Gadget.Settings.readString("temp");
 var last_condition = System.Gadget.Settings.readString("condition");
 				var end = data.indexOf('</tmp>',end);
 				temp.value = data.substr(start, end-start) + "°";
 				System.Gadget.Settings.writeString("temp", temp.value);
+				alert("Temp is now: "+temp.value);
 
 				var start = data.indexOf('<t>',start)+3;
 				var end = data.indexOf('</t>',start);
 				condition.value = data.substr(start, end-start).toUpperCase();
 				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;
 	if(temp == null)
 	{
 		alert("Creating temperature text object, with last value: "+last_temp);
-		temp = bg.addTextObject((last_temp=null?last_temp:"70°"), fonttype, 85, "white", 0, 0);
+		temp = bg.addTextObject((last_temp=null?last_temp:"70°"), fonttype, 85, textcolor, 0, 0);
 		temp.opacity = 30;
 	}
 
 	if(condition == null)
 	{
 		alert("Creating condition text object, with last value: "+last_condition);
-		condition = bg.addTextObject((last_condition!=null?last_condition:"CLEAR"), fonttype, 60, "white", 0, 70);
+		condition = bg.addTextObject((last_condition!=null?last_condition.replace("AND", "/").replace("MOSTLY",""):"CLEAR"), fonttype, 60, textcolor, 0, 70);
 		condition.opacity = 30;
 	}