home *** CD-ROM | disk | FTP | other *** search
/ Freelog 117 / FreelogNo117-OctobreNovembre2013.iso / Theme / 8GadgetPack / 8GadgetPackSetup.msi / Gadgets.7z / Gadgets / MyWeather.gadget / de / js / gadget.js < prev    next >
Text File  |  2013-04-17  |  19KB  |  356 lines

  1. System.Gadget.settingsUI = "settings.html";
  2. System.Gadget.onSettingsClosed = settingsClosed;
  3. System.Gadget.onDock = docked;
  4. System.Gadget.onUndock = undocked;    
  5. var txtcolor = "Color(255, 255, 255, 255)";
  6. var font = "Calibri";
  7. var fontsizeBIG   = 21;
  8. var fontsizeSMALL = 12;
  9. var confirmy_var = System.Gadget.Settings.read("confirmy");
  10. if(confirmy_var==''){confirmy_var=false;System.Gadget.Settings.write("confirmy", confirmy_var);}
  11. var userAgenty = System.Gadget.Settings.read("userAgenty");
  12. if(userAgenty==''){userAgenty=false;System.Gadget.Settings.write("userAgenty", userAgenty);}
  13. var win        = System.Gadget.Settings.read("win");
  14. if(win=='')
  15. {
  16.    var userAgent = navigator.userAgent.toLowerCase();
  17.    if(userAgent.indexOf("windows nt 6.0")>-1){var win="vista";}else{var win="win7";}
  18.    System.Gadget.Settings.write("win", win);
  19. }
  20.  
  21.  
  22. function settingsClosed(p_event) {
  23. go();  
  24.     setTimeout("alarmy();",1000 * 1);
  25.     //OK clicked?
  26.     if (p_event.closeAction == p_event.Action.commit) {
  27.         //yes, read settings here
  28.     }
  29.     
  30.  
  31. function p(){
  32.     go_once();
  33.  
  34. }
  35. function update(run){   
  36.     document.getElementById("bg").removeObjects();
  37.     if(confirmy_var == true && run == 0){setTimeout("alarmy();",1000 * 1);}
  38.     if(System.Gadget.docked == true) {docked();}else{undocked();}
  39.     
  40. /*
  41. var txtAlign = bg.addTextObject(ssid_txt, "Calibri", 12, "black", 9,7);
  42. var txtAlign = bg.addTextObject(Strength+"%", "Calibri", 24, "black", 9,24);
  43. var txtAlign = bg.addTextObject(ssid_txt, "Calibri", 12, "white", 8,6);
  44. var txtAlign = bg.addTextObject(Strength+"%", "Calibri", 24, "white", 8,23);
  45. bg.addImageObject("img/"+img+".png", 75, 22);
  46. */
  47. }
  48. function small(){  
  49.     document.getElementById("bg").removeObjects();      
  50.     bg.addImageObject("img/w"+System.Gadget.Settings.read("styley")+"/"+System.Gadget.Settings.read("current_skycode")+".png", 5, 8);
  51.     
  52.                  
  53. if(System.Gadget.Settings.read("ortname") == ''){checkconnection();}else{
  54. // TXT \\ 
  55. var txtAlign = bg.addTextObject(System.Gadget.Settings.read("current_temperature"), font, fontsizeBIG, txtcolor, 121,5);
  56. txtAlign.align = 2; txtAlign.addShadow("black", 1, 100, 1, 1);
  57. var  txtAlign = bg.addTextObject(System.Gadget.Settings.read("today_vorschau"), font, fontsizeSMALL, txtcolor, 120,29);
  58. txtAlign.align = 2; txtAlign.addShadow("black", 1, 100, 1, 1);
  59. var  txtAlign = bg.addTextObject(System.Gadget.Settings.read("shortort"), font, fontsizeSMALL, txtcolor, 119,43);
  60. txtAlign.align = 2; txtAlign.addShadow("black", 1, 100, 1, 1);
  61. }
  62.  
  63. }
  64.  
  65. function big(){
  66.     document.getElementById("bg").removeObjects();
  67.     bg.addImageObject("img/w"+System.Gadget.Settings.read("styley")+"/"+System.Gadget.Settings.read("current_skycode")+".png", 5, 8);   
  68.  
  69. if(System.Gadget.Settings.read("ortname") == ''){checkconnection();}else{
  70. // TXT \\
  71. var txtAlign = bg.addTextObject(System.Gadget.Settings.read("current_temperature"), font, fontsizeBIG, txtcolor, 121,5);
  72. txtAlign.align = 2; txtAlign.addShadow("black", 1, 100, 1, 1);
  73. var  txtAlign = bg.addTextObject(System.Gadget.Settings.read("today_vorschau"), font, fontsizeSMALL, txtcolor, 120,29);
  74. txtAlign.align = 2; txtAlign.addShadow("black", 1, 100, 1, 1);
  75. var  txtAlign = bg.addTextObject(System.Gadget.Settings.read("shortort"), font, fontsizeSMALL, txtcolor, 119,43);
  76. txtAlign.align = 2; txtAlign.addShadow("black", 1, 100, 1, 1);
  77.  
  78.  
  79. var n = System.Gadget.Settings.read("current_skytext");
  80. n = n.replace(/Vereinzelte Schneef├ñlle/g, "Leichter Schneefall");
  81. n = n.replace(/Vereinzelte /g, "Leichte ");
  82. if(n.indexOf("/") > -1){var s = n.split("/");n = s[0];}
  83.                    
  84. var txtAlign = bg.addTextObject(lang.skytext, font, fontsizeSMALL, txtcolor, 9,70); 
  85. txtAlign.addShadow("black", 1, 100, 1, 1);  
  86. var txtAlign = bg.addTextObject(n, font, fontsizeSMALL, txtcolor, 119,70);
  87. txtAlign.align = 2; txtAlign.addShadow("black", 1, 100, 1, 1); 
  88.  
  89. var txtAlign = bg.addTextObject(lang.feelslike, font, fontsizeSMALL, txtcolor, 9,82);
  90. txtAlign.addShadow("black", 1, 100, 1, 1);
  91. var txtAlign = bg.addTextObject(System.Gadget.Settings.read("current_feelslike")+"┬░"+System.Gadget.Settings.read("grad"), font, fontsizeSMALL, txtcolor, 120,82);
  92. txtAlign.align = 2; txtAlign.addShadow("black", 1, 100, 1, 1);
  93.  
  94. var txtAlign = bg.addTextObject(lang.humidity, font, fontsizeSMALL, txtcolor, 9,94);
  95. txtAlign.addShadow("black", 1, 100, 1, 1);
  96. var txtAlign = bg.addTextObject(System.Gadget.Settings.read("current_humidity")+"%", font, fontsizeSMALL, txtcolor, 121,94);
  97. txtAlign.align = 2; txtAlign.addShadow("black", 1, 100, 1, 1);
  98.  
  99. var txtAlign = bg.addTextObject(lang.windspeed, font, fontsizeSMALL, txtcolor, 9,106);
  100. txtAlign.addShadow("black", 1, 100, 1, 1);
  101. var txtAlign = bg.addTextObject(System.Gadget.Settings.read("current_winddisplay"), font, fontsizeSMALL, txtcolor, 119,106);
  102. txtAlign.align = 2; txtAlign.addShadow("black", 1, 100, 1, 1);
  103.  
  104. var ob = System.Gadget.Settings.read("current_observationtime");
  105. if(ob.indexOf(":") > -1){var s = ob.split(":");ob = s[0]+":"+s[1]+" "+lang.oclock;}
  106.  
  107.  
  108. var txtAlign = bg.addTextObject(lang.ob, font, fontsizeSMALL, txtcolor, 9,118);
  109. txtAlign.addShadow("black", 1, 100, 1, 1);
  110. var txtAlign = bg.addTextObject(ob, font, fontsizeSMALL, txtcolor, 119,118);
  111. txtAlign.align = 2; txtAlign.addShadow("black", 1, 100, 1, 1);
  112.  
  113.  
  114.  
  115. // days
  116. bg.addImageObject("img/m"+System.Gadget.Settings.read("styley")+"/"+System.Gadget.Settings.read("forecast1_skycodeday")+".png", 15, 146);
  117. var txtAlign = bg.addTextObject(System.Gadget.Settings.read("forecast1_day"), font, fontsizeSMALL, txtcolor, 49,145);
  118. txtAlign.addShadow("black", 1, 100, 1, 1);
  119. var txtAlign = bg.addTextObject(System.Gadget.Settings.read("forecast1_low")+"┬░ / "+System.Gadget.Settings.read("forecast1_high")+"┬░", font, fontsizeSMALL, txtcolor, 50,157);
  120. txtAlign.addShadow("black", 1, 100, 1, 1);
  121.  
  122.  
  123. bg.addImageObject("img/m"+System.Gadget.Settings.read("styley")+"/"+System.Gadget.Settings.read("forecast2_skycodeday")+".png", 15, 177);
  124. var txtAlign = bg.addTextObject(System.Gadget.Settings.read("forecast2_day"), font, fontsizeSMALL, txtcolor, 49,176);
  125. txtAlign.addShadow("black", 1, 100, 1, 1);
  126. var txtAlign = bg.addTextObject(System.Gadget.Settings.read("forecast2_low")+"┬░ / "+System.Gadget.Settings.read("forecast2_high")+"┬░", font, fontsizeSMALL, txtcolor, 50,188);
  127. txtAlign.addShadow("black", 1, 100, 1, 1);
  128.  
  129.  
  130. bg.addImageObject("img/m"+System.Gadget.Settings.read("styley")+"/"+System.Gadget.Settings.read("forecast3_skycodeday")+".png", 15, 208);
  131. var txtAlign = bg.addTextObject(System.Gadget.Settings.read("forecast3_day"), font, fontsizeSMALL, txtcolor, 49,207);
  132. txtAlign.addShadow("black", 1, 100, 1, 1);
  133. var txtAlign = bg.addTextObject(System.Gadget.Settings.read("forecast3_low")+"┬░ / "+System.Gadget.Settings.read("forecast3_high")+"┬░", font, fontsizeSMALL, txtcolor, 50,219);
  134. txtAlign.addShadow("black", 1, 100, 1, 1);
  135.  
  136.  
  137. bg.addImageObject("img/m"+System.Gadget.Settings.read("styley")+"/"+System.Gadget.Settings.read("forecast4_skycodeday")+".png", 15, 239);
  138. var txtAlign = bg.addTextObject(System.Gadget.Settings.read("forecast4_day"), font, fontsizeSMALL, txtcolor, 49,238);
  139. txtAlign.addShadow("black", 1, 100, 1, 1);
  140. var txtAlign = bg.addTextObject(System.Gadget.Settings.read("forecast4_low")+"┬░ / "+System.Gadget.Settings.read("forecast4_high")+"┬░", font, fontsizeSMALL, txtcolor, 50,250);
  141. txtAlign.addShadow("black", 1, 100, 1, 1);
  142.  
  143.  
  144. }
  145.  
  146.  
  147. }
  148.  
  149.  
  150.  
  151.  
  152. function go_once(){
  153.    var sett1  = setTimeout("load('1');",1000 * 1);
  154.    var sett2  = setTimeout("load('1');",1000 * 5);
  155.    var sett3  = setTimeout("load('1');",1000 * 10);
  156.    var sett4  = setTimeout("load('1');",1000 * 15);
  157.    var sett5  = setTimeout("load('1');",1000 * 30);
  158.    var sett6  = setTimeout("load('1');",1000 * 60);
  159.    var sett7  = setTimeout("load('1');",1000 * 60 * 5);
  160.    var sett8  = setTimeout("load('1');",1000 * 60 * 10);
  161.    var sett9  = setTimeout("load('1');",1000 * 60 * 20); 
  162. }
  163. function go() {
  164.    var sett10 = setTimeout("load('0');",1000 * 60 * 30);
  165.    go_once();
  166. }
  167. function load(run) {
  168.  
  169.  
  170. if(run==0){go();/*confirm('lade daten');*/}
  171. var txtcolor = System.Gadget.Settings.read("txtcolor");
  172. if(txtcolor==''){txtcolor="1";System.Gadget.Settings.write("txtcolor", txtcolor);}
  173. var ort  = System.Gadget.Settings.read("ort");  if(ort==''){ort="wc:GMXX0185";System.Gadget.Settings.write("ort", ort);System.Gadget.Settings.write("ortname", "Frankfurt/Main, HE");System.Gadget.Settings.write("shortort", "Frankfurt");}
  174. var grad = System.Gadget.Settings.read("grad"); if(grad==''){grad="C";System.Gadget.Settings.write("grad", grad);}
  175. var map  = System.Gadget.Settings.read("map");  if(map==''){map="0";System.Gadget.Settings.write("map", map);}
  176. var style= System.Gadget.Settings.read("style");if(style==''){style="b";System.Gadget.Settings.write("style", style);}
  177. var styley=System.Gadget.Settings.read("styley");
  178. if(styley==''){styley="1";System.Gadget.Settings.write("styley", styley);}
  179. if(System.Gadget.docked == true) {docked();}else{undocked();}
  180.  
  181.     //document.getElementById("bg").removeObjects();
  182.     //document.body.style.height = "67px";
  183.     //var oBackground = document.getElementById("bg");
  184.     //    oBackground.src = "url(img/bg-docked4_"+style+".png)";
  185.  
  186. var rssDoc2 = new ActiveXObject("MSXML2.DOMDocument.3.0");
  187. rssDoc2.onreadystatechange = popData2;
  188. rssDoc2.load("http://weather.service.msn.com/data.aspx?src=vista&wealocations="+System.Gadget.Settings.read("ort")+"&weadegreetype="+System.Gadget.Settings.read("grad")+"&culture=de-DE");
  189.  
  190.  
  191.  
  192. //alert("jo");        
  193.  
  194. function popData2(){  
  195. if(rssDoc2.readyState!=4)return;
  196. var rssItems2 = rssDoc2.selectNodes("/weatherdata/weather");  
  197. for(var i=0;i<rssItems2.length;i++)
  198. System.Gadget.Settings.write("timezone", rssItems2[i].selectSingleNode("./@timezone").text);
  199. var stadt = rssItems2[i].selectSingleNode("./@weatherlocationname").text;
  200. var alertvar = rssItems2[i].selectSingleNode("./@weatherlocationname").text;  
  201.  
  202.  
  203. System.Gadget.Settings.write("current_temperature", rssItems2[i].selectSingleNode("./current/@temperature").text+"┬░"+grad);
  204. System.Gadget.Settings.write("current_skycode", rssItems2[i].selectSingleNode("./current/@skycode").text);
  205. System.Gadget.Settings.write("current_skytext", rssItems2[i].selectSingleNode("./current/@skytext").text);
  206. System.Gadget.Settings.write("current_date", rssItems2[i].selectSingleNode("./current/@date").text);
  207. System.Gadget.Settings.write("current_day", rssItems2[i].selectSingleNode("./current/@day").text);
  208. System.Gadget.Settings.write("current_shortday", rssItems2[i].selectSingleNode("./current/@shortday").text);
  209. System.Gadget.Settings.write("current_observationtime", rssItems2[i].selectSingleNode("./current/@observationtime").text);
  210. System.Gadget.Settings.write("current_observationpoint", rssItems2[i].selectSingleNode("./current/@observationpoint").text);
  211. System.Gadget.Settings.write("current_feelslike", rssItems2[i].selectSingleNode("./current/@feelslike").text);
  212. System.Gadget.Settings.write("current_humidity", rssItems2[i].selectSingleNode("./current/@humidity").text);
  213. System.Gadget.Settings.write("current_windspeed", rssItems2[i].selectSingleNode("./current/@windspeed").text);
  214. System.Gadget.Settings.write("current_winddisplay", rssItems2[i].selectSingleNode("./current/@winddisplay").text);
  215.  
  216. System.Gadget.Settings.write("forecast0_low", rssItems2[i].selectSingleNode("./forecast[0]/@low").text);
  217. System.Gadget.Settings.write("forecast0_high", rssItems2[i].selectSingleNode("./forecast[0]/@high").text);
  218. System.Gadget.Settings.write("forecast0_skycodeday", rssItems2[i].selectSingleNode("./forecast[0]/@skycodeday").text);
  219. System.Gadget.Settings.write("forecast0_skytextday", rssItems2[i].selectSingleNode("./forecast[0]/@skytextday").text);
  220. System.Gadget.Settings.write("forecast0_date", rssItems2[i].selectSingleNode("./forecast[0]/@date").text);
  221. System.Gadget.Settings.write("forecast0_day", rssItems2[i].selectSingleNode("./forecast[0]/@day").text);
  222. System.Gadget.Settings.write("forecast0_shortday", rssItems2[i].selectSingleNode("./forecast[0]/@shortday").text);
  223. System.Gadget.Settings.write("forecast0_precip", rssItems2[i].selectSingleNode("./forecast[0]/@precip").text);
  224. var today_vorschau = System.Gadget.Settings.read("forecast0_low")+"┬░ / "+System.Gadget.Settings.read("forecast0_high")+"┬░";
  225. System.Gadget.Settings.write("today_vorschau", today_vorschau);
  226.  
  227. System.Gadget.Settings.write("forecast1_low", rssItems2[i].selectSingleNode("./forecast[1]/@low").text);
  228. System.Gadget.Settings.write("forecast1_high", rssItems2[i].selectSingleNode("./forecast[1]/@high").text);
  229. System.Gadget.Settings.write("forecast1_skycodeday", rssItems2[i].selectSingleNode("./forecast[1]/@skycodeday").text);
  230. System.Gadget.Settings.write("forecast1_skytextday", rssItems2[i].selectSingleNode("./forecast[1]/@skytextday").text);
  231. System.Gadget.Settings.write("forecast1_date", rssItems2[i].selectSingleNode("./forecast[1]/@date").text);
  232. System.Gadget.Settings.write("forecast1_day", rssItems2[i].selectSingleNode("./forecast[1]/@day").text);
  233. System.Gadget.Settings.write("forecast1_shortday", rssItems2[i].selectSingleNode("./forecast[1]/@shortday").text);
  234. System.Gadget.Settings.write("forecast1_precip", rssItems2[i].selectSingleNode("./forecast[1]/@precip").text);
  235.  
  236. System.Gadget.Settings.write("forecast2_low", rssItems2[i].selectSingleNode("./forecast[2]/@low").text);
  237. System.Gadget.Settings.write("forecast2_high", rssItems2[i].selectSingleNode("./forecast[2]/@high").text);
  238. System.Gadget.Settings.write("forecast2_skycodeday", rssItems2[i].selectSingleNode("./forecast[2]/@skycodeday").text);
  239. System.Gadget.Settings.write("forecast2_skytextday", rssItems2[i].selectSingleNode("./forecast[2]/@skytextday").text);
  240. System.Gadget.Settings.write("forecast2_date", rssItems2[i].selectSingleNode("./forecast[2]/@date").text);
  241. System.Gadget.Settings.write("forecast2_day", rssItems2[i].selectSingleNode("./forecast[2]/@day").text);
  242. System.Gadget.Settings.write("forecast2_shortday", rssItems2[i].selectSingleNode("./forecast[2]/@shortday").text);
  243. System.Gadget.Settings.write("forecast2_precip", rssItems2[i].selectSingleNode("./forecast[2]/@precip").text);
  244.  
  245. System.Gadget.Settings.write("forecast3_low", rssItems2[i].selectSingleNode("./forecast[3]/@low").text);
  246. System.Gadget.Settings.write("forecast3_high", rssItems2[i].selectSingleNode("./forecast[3]/@high").text);
  247. System.Gadget.Settings.write("forecast3_skycodeday", rssItems2[i].selectSingleNode("./forecast[3]/@skycodeday").text);
  248. System.Gadget.Settings.write("forecast3_skytextday", rssItems2[i].selectSingleNode("./forecast[3]/@skytextday").text);
  249. System.Gadget.Settings.write("forecast3_date", rssItems2[i].selectSingleNode("./forecast[3]/@date").text);
  250. System.Gadget.Settings.write("forecast3_day", rssItems2[i].selectSingleNode("./forecast[3]/@day").text);
  251. System.Gadget.Settings.write("forecast3_shortday", rssItems2[i].selectSingleNode("./forecast[3]/@shortday").text);
  252. System.Gadget.Settings.write("forecast3_precip", rssItems2[i].selectSingleNode("./forecast[3]/@precip").text);
  253.  
  254. System.Gadget.Settings.write("forecast4_low", rssItems2[i].selectSingleNode("./forecast[4]/@low").text);
  255. System.Gadget.Settings.write("forecast4_high", rssItems2[i].selectSingleNode("./forecast[4]/@high").text);
  256. System.Gadget.Settings.write("forecast4_skycodeday", rssItems2[i].selectSingleNode("./forecast[4]/@skycodeday").text);
  257. System.Gadget.Settings.write("forecast4_skytextday", rssItems2[i].selectSingleNode("./forecast[4]/@skytextday").text);
  258. System.Gadget.Settings.write("forecast4_date", rssItems2[i].selectSingleNode("./forecast[4]/@date").text);
  259. System.Gadget.Settings.write("forecast4_day", rssItems2[i].selectSingleNode("./forecast[4]/@day").text);
  260. System.Gadget.Settings.write("forecast4_shortday", rssItems2[i].selectSingleNode("./forecast[4]/@shortday").text);
  261. System.Gadget.Settings.write("forecast4_precip", rssItems2[i].selectSingleNode("./forecast[4]/@precip").text);
  262.  
  263.  
  264. //alert(System.Gadget.Settings.read("current_temperature"));
  265. }   
  266. update(run);   
  267. }
  268.  
  269.  
  270.  
  271.  
  272. }
  273. function checkconnection(){
  274. document.getElementById("bg").removeObjects();
  275. var  txtAlign = bg.addTextObject(lang.need, font, fontsizeSMALL, txtcolor, 65,25);
  276. txtAlign.align = 1; txtAlign.addShadow("black", 1, 100, 1, 1);
  277. var sett2  = setTimeout("load('1');",1000 * 2);
  278. }
  279.  
  280. function docked() {
  281.  
  282. if(System.Gadget.Settings.read("userAgenty") == true)
  283. {
  284. var style=System.Gadget.Settings.read("style");
  285.     document.body.style.height = "280px";
  286. var oBackground = document.getElementById("bg");
  287.     oBackground.src = "url(img/bg-undocked4_"+style+".png)";
  288. big();
  289. }
  290. else
  291. {
  292. var style=System.Gadget.Settings.read("style");
  293.     document.body.style.height = "67px";
  294. var oBackground = document.getElementById("bg");
  295.  
  296.     oBackground.src = "url(img/bg-docked4_"+style+".png)";
  297. small();
  298. }
  299. }
  300.  
  301.  
  302. function undocked() {
  303. var style=System.Gadget.Settings.read("style");
  304.     document.body.style.height = "280px";
  305. var oBackground = document.getElementById("bg");
  306.     oBackground.src = "url(img/bg-undocked4_"+style+".png)";
  307. big();
  308. }
  309.  
  310. function showFlyout () {
  311. System.Gadget.Flyout.file = "flyout.html";
  312. hideFlyout();
  313. System.Gadget.Flyout.show = true;
  314. System.Gadget.Flyout.onShow = function() {
  315. System.Gadget.Flyout.document.getElementById("iframe").src = flyoutHTML;
  316. }
  317. }
  318.  
  319. function hideFlyout () {
  320. if (System.Gadget.Flyout.show) {
  321. System.Gadget.Flyout.show = false;
  322. }
  323. }
  324.  
  325.  
  326. function stripHTML(str){
  327.     var tmp = str.replace(/(<.*['"])([^'"]*)(['"]>)/g,
  328.     function(x, p1, p2, p3) { return  p1 + p3;} );
  329.     return tmp.replace(/<\/?[^>]+>/gi, '');
  330. }
  331. function trim (str) {
  332.     return str.replace(/[\n\r]/g, '').replace(/ +/g, ' ').replace(/^\s+/g, '').replace(/\s+$/g, '');
  333. }    
  334. function alarmy(){
  335.  
  336.  var alarmhttp = new ActiveXObject("Microsoft.XMLHTTP");
  337.  alarmhttp.open("GET", "http://wetter.msn.com/bulletin.aspx?wealocations="+System.Gadget.Settings.read("ort")+"&mkt=de-de&setunit="+System.Gadget.Settings.read("grad"), false);
  338.  alarmhttp.send();
  339.  if(alarmhttp.ReadyState==4)
  340.     {
  341.         if(alarmhttp.responseText.indexOf("Derzeit liegen keine aktiven Warnungen oder g├╝ltigen Empfehlungen vor") == -1){
  342.             var posStart = alarmhttp.responseText.indexOf("<div class=\"parent chrome5 promo single1\"><h2>");
  343.             var posEnd   = alarmhttp.responseText.indexOf("</h2><div class=\"child c1 first\">");
  344.             var alarmExtrakt = alarmhttp.responseText.slice(posStart, posEnd);
  345.             alarmExtrakt = stripHTML(alarmExtrakt);
  346.         }else{var alarmExtrakt = "";}
  347.         System.Gadget.Settings.write("alarm", alarmExtrakt);
  348.     }
  349.  else{}
  350.    
  351.     var al = System.Gadget.Settings.read("alarm");
  352.     if(System.Gadget.Settings.read("confirmy") == true && System.Gadget.Settings.read("alarm") != ''){alert(al);}
  353.     
  354. }