diff --git a/grepolis.user.js b/grepolis.user.js index e60a79c..8974608 100644 --- a/grepolis.user.js +++ b/grepolis.user.js @@ -43,7 +43,16 @@ var s = document.createElement("script"); s.type = "text/javascript"; - s.innerHTML = 'function countdown(time, id){t = time;h = Math.floor(t/(60*60)) % 24;m = Math.floor(t/60) %60;s = t %60;h = (h < 10) ? "0"+h : h;m = (m < 10) ? "0"+m : m;s = (s < 10) ? "0"+s : s;strZeit = h + ":" + m + ":" + s;durations[id]=durations[id]-1;window.setTimeout(\'countdown(\'+durations[id]+\',\\\'\'+id+\'\\\')\',1000);document.getElementById(id).innerHTML = strZeit;}'; + s.innerHTML = 'function countdown(time, id){' + +'t = time;' + +'h = Math.floor(t/(60*60)) % 24;' + +'m = Math.floor(t/60) %60;' + +'s = t %60;' + +'h = (h < 10) ? "0"+h : h;m = (m < 10) ? "0"+m : m;s = (s < 10) ? "0"+s : s;' + +'strZeit = h + ":" + m + ":" + s;' + +'durations[id]=durations[id]-1;' + +'window.setTimeout(\'countdown(\'+durations[id]+\',\\\'\'+id+\'\\\')\',1000);' + +'document.getElementById(id).innerHTML = strZeit;}'; document.getElementsByTagName("head")[0].appendChild(s); farm_ids.forEach(function(xFarmId) {