/ ‘grepolis.user.js’
This commit is contained in:
parent
61c271e9ef
commit
47785a1178
@ -10,7 +10,7 @@
|
||||
//
|
||||
// @match http://*.grepolis.com/game/*
|
||||
//
|
||||
// @version 1.0.40
|
||||
// @version 1.0.41
|
||||
// @updateURL http://git.javil.eu/jan/userscripts/raw/master/grepolis.user.js
|
||||
// ==/UserScript==
|
||||
|
||||
@ -60,10 +60,8 @@
|
||||
|
||||
var windowId = windows[xFarmId];
|
||||
if(windowId == undefined){
|
||||
console.log("Opening new Window");
|
||||
var wnd = GPWindowMgr.Create(
|
||||
GPWindowMgr.TYPE_FARM_TOWN,
|
||||
'',
|
||||
GPWindowMgr.TYPE_FARM_TOWN, '',
|
||||
{'action': "claim_info"},
|
||||
xFarmId);
|
||||
windows[xFarmId] = wnd.getID();
|
||||
@ -74,7 +72,6 @@
|
||||
var wnd = GPWindowMgr.getWindowById(windowId);
|
||||
if(wnd == undefined){
|
||||
windows[xFarmId] = undefined;
|
||||
console.log("Window not open any more");
|
||||
timeout = 50;
|
||||
return;
|
||||
}
|
||||
@ -82,11 +79,9 @@
|
||||
var wndElement = wnd.getElement();
|
||||
if(wndElement == undefined){
|
||||
windows[xFarmId] = undefined;
|
||||
console.log("Window not reachable any more");
|
||||
try {
|
||||
wnd.close();
|
||||
} catch(e) {
|
||||
console.warn("Could not close Window");
|
||||
}
|
||||
timeout = 50;
|
||||
return;
|
||||
@ -102,7 +97,7 @@
|
||||
var seconds = minutes * 60 + ts.substring(5,7) * 1;
|
||||
|
||||
$('.town_name').text(dformat + " +" + ts);
|
||||
console.log("btn is inactive, trying again in " + ts);
|
||||
console.log("Farm " + xFarmId + " not ready, trying again in " + ts);
|
||||
wnd.close();
|
||||
|
||||
timeout = seconds * 1000 + 1000;
|
||||
|
Loading…
x
Reference in New Issue
Block a user