From 2785bd863ab548f2f590a6aee6edf9b8b0999225 Mon Sep 17 00:00:00 2001 From: Jan Bader Date: Wed, 4 Jun 2014 15:53:55 +0200 Subject: [PATCH] =?UTF-8?q?/=20=E2=80=98grepolis.user.js=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- grepolis.user.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/grepolis.user.js b/grepolis.user.js index 399ed50..67b442d 100644 --- a/grepolis.user.js +++ b/grepolis.user.js @@ -10,7 +10,7 @@ // // @match http://*.grepolis.com/game/* // -// @version 1.0.38 +// @version 1.0.39 // @updateURL http://git.javil.eu/jan/userscripts/raw/master/grepolis.user.js // ==/UserScript== @@ -34,6 +34,7 @@ } }; + lastAmounts = ""; console.log("Initializing..."); windows = {}; farm_ids = [1225, 1226, 1229, 1230, 1231]; @@ -50,7 +51,12 @@ var d = new Date(); var dformat = "[" + [d.getUTCHours(), d.getUTCMinutes(), d.getUTCSeconds()].join(':') + "]"; $('.town_name').text(dformat); - console.log($.map($(".indicator .amount"),function(v){return $(v).text()}).join(", ")); + + var amounts = $.map($(".indicator .amount"),function(v){return $(v).text()}).join(", "); + if(amounts != lastAmounts) { + console.log(amounts); + lastAmounts = amounts; + } var windowId = windows[xFarmId]; if(windowId == undefined){