/ ‘grepolis.user.js’
This commit is contained in:
parent
203a716979
commit
c90e118489
@ -10,7 +10,7 @@
|
|||||||
//
|
//
|
||||||
// @match http://*.grepolis.com/game/*
|
// @match http://*.grepolis.com/game/*
|
||||||
//
|
//
|
||||||
// @version 1.0.79
|
// @version 1.0.80
|
||||||
// @updateURL http://git.javil.eu/jan/userscripts/raw/master/grepolis.user.js
|
// @updateURL http://git.javil.eu/jan/userscripts/raw/master/grepolis.user.js
|
||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
|
|
||||||
@ -44,15 +44,14 @@
|
|||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
var s = document.createElement("script");
|
var s = document.createElement("script");
|
||||||
s.type = "text/javascript";
|
s.type = "text/javascript";
|
||||||
s.innerHTML = 'function countdown(t, id){'
|
s.innerHTML = 'function j_countdown(t, id){'
|
||||||
+'console.log(""+t);'
|
+'var h = Math.floor(t/(60*60)) % 24;'
|
||||||
+'h = Math.floor(t/(60*60)) % 24;'
|
+'var m = Math.floor(t/60) %60;'
|
||||||
+'m = Math.floor(t/60) %60;'
|
+'var s = t %60;'
|
||||||
+'s = t %60;'
|
|
||||||
+'h = (h < 10) ? "0"+h : h;m = (m < 10) ? "0"+m : m;s = (s < 10) ? "0"+s : s;'
|
+'h = (h < 10) ? "0"+h : h;m = (m < 10) ? "0"+m : m;s = (s < 10) ? "0"+s : s;'
|
||||||
+'strZeit = h + ":" + m + ":" + s;'
|
+'var strZeit = h + ":" + m + ":" + s;'
|
||||||
+'durations[id]=durations[id]-1;'
|
+'durations[id]=durations[id]-1;'
|
||||||
+'window.setTimeout(\'countdown(\'+durations[id]+\',\\\'\'+id+\'\\\')\',1000);'
|
+'window.setTimeout(\'j_countdown(\'+durations[id]+\',\\\'\'+id+\'\\\')\',1000);'
|
||||||
+'document.getElementById(id).innerHTML = strZeit;}';
|
+'document.getElementById(id).innerHTML = strZeit;}';
|
||||||
document.getElementsByTagName("head")[0].appendChild(s);
|
document.getElementsByTagName("head")[0].appendChild(s);
|
||||||
|
|
||||||
@ -60,7 +59,7 @@
|
|||||||
var tmout = 5000 + rand(5);
|
var tmout = 5000 + rand(5);
|
||||||
setTimeout(getWaresTick(xFarmId), tmout);
|
setTimeout(getWaresTick(xFarmId), tmout);
|
||||||
var tmoutId = 'farm-' + xFarmId
|
var tmoutId = 'farm-' + xFarmId
|
||||||
logWindowElement.append('Farm ID ' + xFarmId + ': <span id="' + tmoutId + '"><script>countdown(' + Math.floor(tmout/1000) + ', "' + tmoutId + '");</script></span><br />');
|
logWindowElement.append('Farm ID ' + xFarmId + ': <span id="' + tmoutId + '"><script>j_countdown(' + Math.floor(tmout/1000) + ', "' + tmoutId + '");</script></span><br />');
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#ui-id-1").empty().append("<select id=choosefarmduration><option value=300>5min</option><option value=1200>20min</option><option value=5400>90min</option><option value=14400>4h</option></select>");
|
$("#ui-id-1").empty().append("<select id=choosefarmduration><option value=300>5min</option><option value=1200>20min</option><option value=5400>90min</option><option value=14400>4h</option></select>");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user