From 0b42685d08e1d5a923ef2a19793938d13a247461 Mon Sep 17 00:00:00 2001 From: Jan Bader Date: Wed, 4 Jun 2014 19:11:00 +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 | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/grepolis.user.js b/grepolis.user.js index 5db3432..6bdaefb 100644 --- a/grepolis.user.js +++ b/grepolis.user.js @@ -10,30 +10,12 @@ // // @match http://*.grepolis.com/game/* // -// @version 1.0.48 +// @version 1.0.49 // @updateURL http://git.javil.eu/jan/userscripts/raw/master/grepolis.user.js // ==/UserScript== (function() { - console.logCopy = console.log.bind(console); - console.log = function() { - var date = new Date(); // Timestamp to prepend - var timestamp = new Date(date.getTime() - (date.getTimezoneOffset() * 60000)).toJSON(); - if (arguments.length) { - var args = Array.prototype.slice.call(arguments, 0); - - // If there is a format string then... it must be a string - if (typeof arguments[0] === "string") { - args[0] = "%s: " + arguments[0]; - args.splice(1, 0, timestamp); - this.logCopy.apply(this, args); - } else { - this.logCopy(timestamp, args); - } - } - }; - lastAmounts = ""; console.log("Initializing..."); windows = {}; @@ -61,10 +43,9 @@ logWindowElement.empty(); function log(xText) { - console.log(xText); var date = new Date(); // Timestamp to prepend var timestamp = new Date(date.getTime() - (date.getTimezoneOffset() * 60000)).toJSON(); - logWindowElement.append(timestamp + ": " + xText + "
"); + logWindowElement.append('' + xText + "
"); logWindowElement.scrollTop(logWindowElement[0].scrollHeight); }