/ ‘grepolis.user.js’

This commit is contained in:
Jan Bader 2014-06-15 01:00:29 +02:00
parent ad10c8c722
commit 78ddd99077

View File

@ -10,7 +10,7 @@
//
// @match http://*.grepolis.com/game/*
//
// @version 1.0.76
// @version 1.0.77
// @updateURL http://git.javil.eu/jan/userscripts/raw/master/grepolis.user.js
// ==/UserScript==
@ -24,6 +24,7 @@
//farm_ids = [1225, 1226, 1228, 1229, 1230, 1231];
farm_ids = [20466, 20472, 20471];
setTimeout(function() {
var logWindow = new GPWindow(-1, null);
logWindow.createWindow();
logWindowElement = $(logWindow.getElement());
@ -41,7 +42,6 @@
});
logWindowElement.empty();
setTimeout(function() {
var s = document.createElement("script");
s.type = "text/javascript";
s.innerHTML = 'function countdown(t, id){'
@ -62,7 +62,6 @@
var tmoutId = 'farm-' + xFarmId
logWindowElement.append('<span id="' + tmoutId + '">Farm ID ' + xFarmId + ': <script>countdown(' + Math.floor(tmout/1000) + ', "' + tmoutId + '");</script></span><br />');
});
}, 5000);
$("#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>");
var choose = $("#choosefarmduration")[0];
@ -70,6 +69,7 @@
farmDuration = this.value;
log("Duration changed to: " + farmDuration);
}
}, 5000);
function log(xText) {
var date = new Date(); // Timestamp to prepend
@ -86,7 +86,6 @@
return Math.floor((Math.random() * max * 1000));
}
setTimeout(getWaresTick, 5000);
function getWaresTick(xFarmId) {
return function() {
var timeout = 60000;