From b814cdf16acc3b86f58363b9c4c19ef1e7da8c0b Mon Sep 17 00:00:00 2001 From: James Campos Date: Thu, 15 Mar 2012 23:20:06 -0700 Subject: [PATCH] log -> $.log --- 4chan_x.user.js | 5 ++--- script.coffee | 6 ++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index f5dafb43f..b7ac5972b 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -73,7 +73,7 @@ */ (function() { - var $, $$, Anonymize, AutoGif, Conf, Config, DAY, ExpandComment, ExpandThread, Favicon, FileInfo, Filter, GetTitle, HOUR, ImageExpand, ImageHover, Keybinds, MINUTE, Main, NAMESPACE, Nav, Options, QR, QuoteBacklink, QuoteCT, QuoteInline, QuoteOP, QuotePreview, Quotify, Redirect, ReplyHiding, ReportButton, RevealSpoilers, SECOND, Sauce, StrikethroughQuotes, ThreadHiding, ThreadStats, Threading, Time, TitlePost, Unread, Updater, VERSION, Watcher, d, engine, flatten, log, ui, _base; + var $, $$, Anonymize, AutoGif, Conf, Config, DAY, ExpandComment, ExpandThread, Favicon, FileInfo, Filter, GetTitle, HOUR, ImageExpand, ImageHover, Keybinds, MINUTE, Main, NAMESPACE, Nav, Options, QR, QuoteBacklink, QuoteCT, QuoteInline, QuoteOP, QuotePreview, Quotify, Redirect, ReplyHiding, ReportButton, RevealSpoilers, SECOND, Sauce, StrikethroughQuotes, ThreadHiding, ThreadStats, Threading, Time, TitlePost, Unread, Updater, VERSION, Watcher, d, engine, flatten, ui, _base; Config = { main: { @@ -192,8 +192,6 @@ } }; - log = typeof (_base = console.log).bind === "function" ? _base.bind(console) : void 0; - Conf = {}; (flatten = function(parent, obj) { @@ -313,6 +311,7 @@ }; $.extend($, { + log: typeof (_base = console.log).bind === "function" ? _base.bind(console) : void 0, ready: function(fc) { var cb; if (/interactive|complete/.test(d.readyState)) return setTimeout(fc); diff --git a/script.coffee b/script.coffee index bcc67765a..08ebfdaa7 100644 --- a/script.coffee +++ b/script.coffee @@ -154,10 +154,6 @@ Config = 'Auto Update': [true, 'Automatically fetch new posts'] 'Interval': 30 -# XXX Chrome can't into {log} = console -# XXX GreaseMonkey can't into console.log.bind -log = console.log.bind? console - # flatten the config Conf = {} (flatten = (parent, obj) -> @@ -272,6 +268,8 @@ $.extend = (object, properties) -> return $.extend $, + # XXX GreaseMonkey can't into console.log.bind + log: console.log.bind? console ready: (fc) -> if /interactive|complete/.test d.readyState # Execute the functions in parallel.