arguments.callee deprecated
This commit is contained in:
parent
2dacb2c8cb
commit
1cebaa7aea
@ -61,7 +61,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
(function() {
|
(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;
|
var __slice = Array.prototype.slice;
|
||||||
config = {
|
config = {
|
||||||
main: {
|
main: {
|
||||||
@ -178,7 +178,7 @@
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
conf = {};
|
conf = {};
|
||||||
(function(parent, obj) {
|
(flatten = function(parent, obj) {
|
||||||
var key, val, _results;
|
var key, val, _results;
|
||||||
if (obj.length) {
|
if (obj.length) {
|
||||||
if (typeof obj[0] === 'boolean') {
|
if (typeof obj[0] === 'boolean') {
|
||||||
@ -190,7 +190,7 @@
|
|||||||
_results = [];
|
_results = [];
|
||||||
for (key in obj) {
|
for (key in obj) {
|
||||||
val = obj[key];
|
val = obj[key];
|
||||||
_results.push(arguments.callee(key, val));
|
_results.push(flatten(key, val));
|
||||||
}
|
}
|
||||||
return _results;
|
return _results;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -106,7 +106,7 @@ if not Object.keys
|
|||||||
|
|
||||||
# flatten the config
|
# flatten the config
|
||||||
conf = {}
|
conf = {}
|
||||||
((parent, obj) ->
|
(flatten = (parent, obj) ->
|
||||||
if obj.length #array
|
if obj.length #array
|
||||||
if typeof obj[0] is 'boolean'
|
if typeof obj[0] is 'boolean'
|
||||||
conf[parent] = obj[0]
|
conf[parent] = obj[0]
|
||||||
@ -114,7 +114,7 @@ conf = {}
|
|||||||
conf[parent] = obj
|
conf[parent] = obj
|
||||||
else if typeof obj is 'object'
|
else if typeof obj is 'object'
|
||||||
for key, val of obj
|
for key, val of obj
|
||||||
arguments.callee key, val
|
flatten key, val
|
||||||
else #constant
|
else #constant
|
||||||
conf[parent] = obj
|
conf[parent] = obj
|
||||||
) null, config
|
) null, config
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user