/ ‘grepolis.user.js’
This commit is contained in:
@ -10,7 +10,7 @@
|
||||
//
|
||||
// @match http://*.grepolis.com/game/*
|
||||
//
|
||||
// @version 1.1.46
|
||||
// @version 1.1.47
|
||||
// @updateURL http://git.javil.eu/jan/userscripts/raw/master/grepolis.user.js
|
||||
// ==/UserScript==
|
||||
|
||||
@ -82,21 +82,7 @@
|
||||
for(var town_id in farm_ids) {
|
||||
console.log("prepare town " + town_id);
|
||||
townCount++;
|
||||
var town_id_c = town_id;
|
||||
setTimeout(function() {
|
||||
console.log("get farms for town " + town_id_c);
|
||||
HelperTown.townSwitch(town_id_c);
|
||||
HelperTown.handleInfoWindowJumpToTownClick();
|
||||
setTimeout(function() {
|
||||
console.log("getting farms for town " + town_id_c);
|
||||
var farmtowns = $(".farmtown_owned_on_same_island");
|
||||
$.each(farmtowns, function(f, farmtown) {
|
||||
var farmtownId = farmtown["id"].split("_")[2];
|
||||
console.log("got farm " + farmtownId + " for town " + town_id_c);
|
||||
farm_ids[town_id_c].push(+farmtownId);
|
||||
});
|
||||
}, 1800);
|
||||
}, townCount*2200);
|
||||
getFarmsFor(town_id, townCount);
|
||||
}
|
||||
|
||||
setTimeout(function() {
|
||||
@ -121,6 +107,23 @@
|
||||
}
|
||||
}, 15000);
|
||||
|
||||
function getFarmsFor(xTownId, xTownCount) {
|
||||
setTimeout(function() {
|
||||
console.log("get farms for town " + xTownId);
|
||||
HelperTown.townSwitch(xTownId);
|
||||
HelperTown.handleInfoWindowJumpToTownClick();
|
||||
setTimeout(function() {
|
||||
console.log("getting farms for town " + xTownId);
|
||||
var farmtowns = $(".farmtown_owned_on_same_island");
|
||||
$.each(farmtowns, function(f, farmtown) {
|
||||
var farmtownId = farmtown["id"].split("_")[2];
|
||||
console.log("got farm " + farmtownId + " for town " + xTownId);
|
||||
farm_ids[xTownId].push(+farmtownId);
|
||||
});
|
||||
}, 1800);
|
||||
}, xTownCount*2200);
|
||||
}
|
||||
|
||||
function log(xText) {
|
||||
var date = new Date(); // Timestamp to prepend
|
||||
var timestamp = new Date(date.getTime() - (date.getTimezoneOffset() * 60000)).toJSON();
|
||||
|
Reference in New Issue
Block a user