From 7b49ae4c76e4a28c90eea91dbcad7364861e1fa5 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Sat, 25 Aug 2012 02:05:26 +0200 Subject: [PATCH] GM can into console.log.bind. --- 4chan_x.user.js | 4 ++-- script.coffee | 10 ++++------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index b79278e72..b1cf2d752 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -73,7 +73,7 @@ */ (function() { - var $, $$, Conf, Config, UI, d, g, _base; + var $, $$, Conf, Config, UI, d, g; Config = { main: { @@ -297,7 +297,7 @@ MINUTE: 1000 * 60, HOUR: 1000 * 60 * 60, DAY: 1000 * 60 * 60 * 24, - log: typeof (_base = console.log).bind === "function" ? _base.bind(console) : void 0, + log: console.log.bind(console), engine: /WebKit|Presto|Gecko/.exec(navigator.userAgent)[0].toLowerCase(), ready: function(fc) { var cb; diff --git a/script.coffee b/script.coffee index 17dcfcbc4..97b071865 100644 --- a/script.coffee +++ b/script.coffee @@ -251,12 +251,10 @@ $.extend = (object, properties) -> $.extend $, SECOND: 1000 - MINUTE: 1000*60 - HOUR : 1000*60*60 - DAY : 1000*60*60*24 - log: - # XXX GreaseMonkey can't into console.log.bind - console.log.bind? console + MINUTE: 1000 *60 + HOUR : 1000 *60 * 60 + DAY : 1000 *60 * 60 * 24 + log: console.log.bind console engine: /WebKit|Presto|Gecko/.exec(navigator.userAgent)[0].toLowerCase() ready: (fc) -> if /interactive|complete/.test d.readyState