diff --git a/4chan_x.user.js b/4chan_x.user.js index 6aecf61b8..3fec91de5 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -61,7 +61,7 @@ */ (function() { - var $, $$, DAY, Favicon, HOUR, MINUTE, Main, NAMESPACE, QR, SECOND, Time, anonymize, conf, config, d, expandComment, expandThread, filter, firstRun, g, getTitle, imgExpand, imgGif, imgHover, imgPreloading, key, keybinds, log, nav, nodeInserted, options, pathname, quoteBacklink, quoteInline, quoteOP, quotePreview, redirect, replyHiding, reportButton, revealSpoilers, sauce, temp, threadHiding, threadStats, threading, titlePost, ui, unread, updater, val, watcher; + var $, $$, DAY, Favicon, HOUR, MINUTE, Main, NAMESPACE, QR, SECOND, Time, anonymize, conf, config, d, expandComment, expandThread, filter, firstRun, flatten, g, getTitle, imgExpand, imgGif, imgHover, imgPreloading, key, keybinds, log, nav, nodeInserted, options, pathname, quoteBacklink, quoteInline, quoteOP, quotePreview, redirect, replyHiding, reportButton, revealSpoilers, sauce, temp, threadHiding, threadStats, threading, titlePost, ui, unread, updater, val, watcher; var __slice = Array.prototype.slice; config = { main: { @@ -178,7 +178,7 @@ }; } conf = {}; - (function(parent, obj) { + (flatten = function(parent, obj) { var key, val, _results; if (obj.length) { if (typeof obj[0] === 'boolean') { @@ -190,7 +190,7 @@ _results = []; for (key in obj) { val = obj[key]; - _results.push(arguments.callee(key, val)); + _results.push(flatten(key, val)); } return _results; } else { diff --git a/script.coffee b/script.coffee index c9ec262b9..67f366c51 100644 --- a/script.coffee +++ b/script.coffee @@ -106,7 +106,7 @@ if not Object.keys # flatten the config conf = {} -((parent, obj) -> +(flatten = (parent, obj) -> if obj.length #array if typeof obj[0] is 'boolean' conf[parent] = obj[0] @@ -114,7 +114,7 @@ conf = {} conf[parent] = obj else if typeof obj is 'object' for key, val of obj - arguments.callee key, val + flatten key, val else #constant conf[parent] = obj ) null, config