diff --git a/grepolis.user.js b/grepolis.user.js
index a0ee494..e70f697 100644
--- a/grepolis.user.js
+++ b/grepolis.user.js
@@ -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,24 +24,24 @@
//farm_ids = [1225, 1226, 1228, 1229, 1230, 1231];
farm_ids = [20466, 20472, 20471];
- var logWindow = new GPWindow(-1, null);
- logWindow.createWindow();
- logWindowElement = $(logWindow.getElement());
- var logWindowWrapper = logWindowElement.parent().parent();
- logWindowWrapper.css({
- "position": "absolute",
- "z-index": 999999999,
- "right": "16px",
- "bottom": 0,
- "width": "300px",
- "height": "300px",
- "align": "left",
- "left": "auto",
- "top": "auto"
- });
- logWindowElement.empty();
-
setTimeout(function() {
+ var logWindow = new GPWindow(-1, null);
+ logWindow.createWindow();
+ logWindowElement = $(logWindow.getElement());
+ var logWindowWrapper = logWindowElement.parent().parent();
+ logWindowWrapper.css({
+ "position": "absolute",
+ "z-index": 999999999,
+ "right": "16px",
+ "bottom": 0,
+ "width": "300px",
+ "height": "300px",
+ "align": "left",
+ "left": "auto",
+ "top": "auto"
+ });
+ logWindowElement.empty();
+
var s = document.createElement("script");
s.type = "text/javascript";
s.innerHTML = 'function countdown(t, id){'
@@ -62,14 +62,14 @@
var tmoutId = 'farm-' + xFarmId
logWindowElement.append('Farm ID ' + xFarmId + ':
');
});
- }, 5000);
- $("#ui-id-1").empty().append("");
- var choose = $("#choosefarmduration")[0];
- choose.onchange = function() {
- farmDuration = this.value;
- log("Duration changed to: " + farmDuration);
- }
+ $("#ui-id-1").empty().append("");
+ var choose = $("#choosefarmduration")[0];
+ choose.onchange = function() {
+ 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;