/ ‘grepolis.user.js’
This commit is contained in:
parent
0e18c0eb64
commit
6481effe23
@ -10,7 +10,7 @@
|
|||||||
//
|
//
|
||||||
// @match http://*.grepolis.com/game/*
|
// @match http://*.grepolis.com/game/*
|
||||||
//
|
//
|
||||||
// @version 1.0.70
|
// @version 1.0.71
|
||||||
// @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==
|
||||||
|
|
||||||
@ -43,14 +43,14 @@
|
|||||||
|
|
||||||
var s = document.createElement("script");
|
var s = document.createElement("script");
|
||||||
s.type = "text/javascript";
|
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;window.setTimeout(\'countdown(\'+ --time+\',\\\'\'+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);
|
document.getElementsByTagName("head")[0].appendChild(s);
|
||||||
|
|
||||||
farm_ids.forEach(function(xFarmId) {
|
farm_ids.forEach(function(xFarmId) {
|
||||||
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('<span id="' + tmoutId + '"><script>countdown(' + Math.floor(tmout/10) + ', "' + tmoutId + '");</script></span><br />');
|
logWindowElement.append('<span id="' + tmoutId + '"><script>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>");
|
||||||
@ -142,7 +142,7 @@
|
|||||||
|
|
||||||
getWaresFromFarm(wnd, mood, xFarmId);
|
getWaresFromFarm(wnd, mood, xFarmId);
|
||||||
} finally {
|
} finally {
|
||||||
durations[xFarmId] = timeout / 1000;
|
durations["farm-" + xFarmId] = timeout / 1000;
|
||||||
setTimeout(getWaresTick(xFarmId), timeout);
|
setTimeout(getWaresTick(xFarmId), timeout);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user