/ ‘grepolis.user.js’
This commit is contained in:
parent
ad10c8c722
commit
78ddd99077
@ -10,7 +10,7 @@
|
|||||||
//
|
//
|
||||||
// @match http://*.grepolis.com/game/*
|
// @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
|
// @updateURL http://git.javil.eu/jan/userscripts/raw/master/grepolis.user.js
|
||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
|
|
||||||
@ -24,24 +24,24 @@
|
|||||||
//farm_ids = [1225, 1226, 1228, 1229, 1230, 1231];
|
//farm_ids = [1225, 1226, 1228, 1229, 1230, 1231];
|
||||||
farm_ids = [20466, 20472, 20471];
|
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() {
|
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");
|
var s = document.createElement("script");
|
||||||
s.type = "text/javascript";
|
s.type = "text/javascript";
|
||||||
s.innerHTML = 'function countdown(t, id){'
|
s.innerHTML = 'function countdown(t, id){'
|
||||||
@ -62,14 +62,14 @@
|
|||||||
var tmoutId = 'farm-' + xFarmId
|
var tmoutId = 'farm-' + xFarmId
|
||||||
logWindowElement.append('<span id="' + tmoutId + '">Farm ID ' + xFarmId + ': <script>countdown(' + Math.floor(tmout/1000) + ', "' + tmoutId + '");</script></span><br />');
|
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>");
|
$("#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];
|
var choose = $("#choosefarmduration")[0];
|
||||||
choose.onchange = function() {
|
choose.onchange = function() {
|
||||||
farmDuration = this.value;
|
farmDuration = this.value;
|
||||||
log("Duration changed to: " + farmDuration);
|
log("Duration changed to: " + farmDuration);
|
||||||
}
|
}
|
||||||
|
}, 5000);
|
||||||
|
|
||||||
function log(xText) {
|
function log(xText) {
|
||||||
var date = new Date(); // Timestamp to prepend
|
var date = new Date(); // Timestamp to prepend
|
||||||
@ -86,7 +86,6 @@
|
|||||||
return Math.floor((Math.random() * max * 1000));
|
return Math.floor((Math.random() * max * 1000));
|
||||||
}
|
}
|
||||||
|
|
||||||
setTimeout(getWaresTick, 5000);
|
|
||||||
function getWaresTick(xFarmId) {
|
function getWaresTick(xFarmId) {
|
||||||
return function() {
|
return function() {
|
||||||
var timeout = 60000;
|
var timeout = 60000;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user