/ ‘grepolis.user.js’

This commit is contained in:
Jan Bader 2014-06-30 18:14:30 +02:00
parent 4b3e894382
commit f4b9953f3b

View File

@ -10,7 +10,7 @@
// //
// @match http://*.grepolis.com/game/* // @match http://*.grepolis.com/game/*
// //
// @version 1.0.96 // @version 1.0.97
// @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==
@ -65,12 +65,15 @@
document.getElementsByTagName("head")[0].appendChild(s); document.getElementsByTagName("head")[0].appendChild(s);
for(var town_id in farm_ids) { for(var town_id in farm_ids) {
var town_countdown = document.createElement("span");
town_countdown.textConten = "" + towns[town_id] + ":";
timerWindow.append(town_countdown);
farm_ids[town_id].forEach(function(xFarmId) { farm_ids[town_id].forEach(function(xFarmId) {
var tmout = 5000 + rand(5); var tmout = 5000 + rand(5);
setTimeout(getWaresTick(town_id, xFarmId), tmout); setTimeout(getWaresTick(town_id, xFarmId), tmout);
var tmoutId = 'farm-' + xFarmId var tmoutId = 'farm-' + xFarmId
timerWindow.append("S: " + towns[town_id] + ', F:' + xFarmId + ': <span id="' + tmoutId + '"><script>j_countdown(' + Math.floor(tmout/1000) + ', "' + tmoutId + '");</script></span><br />'); $(town_countdown).append('<span id="' + tmoutId + '"><script>j_countdown(' + Math.floor(tmout/1000) + ', "' + tmoutId + '");</script></span><br />');
}); });
} }