From 2f01027d08b6fd3cf2476fa941acdff48e732526 Mon Sep 17 00:00:00 2001 From: James Campos Date: Sun, 21 Aug 2011 23:29:47 -0700 Subject: [PATCH] shuffle --- 4chan_x.user.js | 32 ++++++++++++++++---------------- script.coffee | 20 ++++++++++---------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index c2d9bbbba..9baec94fb 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -145,6 +145,22 @@ 'Interval': 30 } }; + if (typeof console !== "undefined" && console !== null) { + log = function() { + return console.log.apply(console, arguments); + }; + } + if (!Object.keys) { + Object.keys = function(o) { + var key, _i, _len, _results; + _results = []; + for (_i = 0, _len = o.length; _i < _len; _i++) { + key = o[_i]; + _results.push(key); + } + return _results; + }; + } conf = {}; (function(parent, obj) { var key, val, _results; @@ -165,22 +181,6 @@ return conf[parent] = obj; } })(null, config); - if (typeof console !== "undefined" && console !== null) { - log = function() { - return console.log.apply(console, arguments); - }; - } - if (!Object.keys) { - Object.keys = function(o) { - var key, _i, _len, _results; - _results = []; - for (_i = 0, _len = o.length; _i < _len; _i++) { - key = o[_i]; - _results.push(key); - } - return _results; - }; - } NAMESPACE = 'AEOS.4chan_x.'; SECOND = 1000; MINUTE = 60 * SECOND; diff --git a/script.coffee b/script.coffee index 36f451a26..956b03d4e 100644 --- a/script.coffee +++ b/script.coffee @@ -81,6 +81,16 @@ config = 'Auto Update': [true, 'Automatically fetch new posts'] 'Interval': 30 +# XXX chrome can't into `{log} = console` +if console? + log = -> + console.log arguments... + +# XXX opera cannot into Object.keys +if not Object.keys + Object.keys = (o) -> + key for key in o + # flatten the config conf = {} ((parent, obj) -> @@ -96,16 +106,6 @@ conf = {} conf[parent] = obj ) null, config -# XXX chrome can't into `{log} = console` -if console? - log = -> - console.log arguments... - -# XXX opera cannot into Object.keys -if not Object.keys - Object.keys = (o) -> - key for key in o - NAMESPACE = 'AEOS.4chan_x.' SECOND = 1000 MINUTE = 60*SECOND