From 3c889374fb2f6b023d73c1ae2420df0f0c6a5683 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Sun, 11 Dec 2011 17:50:48 +0100 Subject: [PATCH] Revert "console.log.bind" This reverts commit df9af7f162af058640c18f83556f3eaf61558289. --- 4chan_x.user.js | 6 +++++- script.coffee | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index b08a69a48..b62a17af0 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -171,7 +171,11 @@ } }; - log = console.log.bind(console); + if (typeof console !== "undefined" && console !== null) { + log = function(arg) { + return console.log(arg); + }; + } if (!Object.keys) { Object.keys = function(o) { diff --git a/script.coffee b/script.coffee index bee386705..be856331f 100644 --- a/script.coffee +++ b/script.coffee @@ -99,7 +99,10 @@ config = 'Interval': 30 # XXX chrome can't into `{log} = console` -log = console.log.bind console +if console? + # XXX scriptish - console.log.apply is not a function + log = (arg) -> + console.log arg # XXX opera cannot into Object.keys if not Object.keys