forEach again
This commit is contained in:
parent
b0851a07ad
commit
090ef475ed
@ -2957,7 +2957,7 @@
|
|||||||
};
|
};
|
||||||
Main = {
|
Main = {
|
||||||
init: function() {
|
init: function() {
|
||||||
var callback, cutoff, hiddenThreads, id, lastChecked, nodes, now, timestamp, tzOffset, _i, _len, _ref, _ref2;
|
var cutoff, hiddenThreads, id, lastChecked, nodes, now, timestamp, tzOffset, _ref;
|
||||||
$.unbind(document, 'DOMContentLoaded', Main.init);
|
$.unbind(document, 'DOMContentLoaded', Main.init);
|
||||||
if (location.hostname === 'sys.4chan.org') {
|
if (location.hostname === 'sys.4chan.org') {
|
||||||
QR.sys();
|
QR.sys();
|
||||||
@ -3087,16 +3087,13 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
nodes = $$('.op, a + table');
|
nodes = $$('.op, a + table');
|
||||||
_ref2 = g.callbacks;
|
g.callbacks.forEach(function(callback) {
|
||||||
for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
|
|
||||||
callback = _ref2[_i];
|
|
||||||
try {
|
try {
|
||||||
nodes.forEach(callback);
|
return nodes.forEach(callback);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
alert(err);
|
return alert(err);
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
$.bind($('form[name=delform]'), 'DOMNodeInserted', Main.node);
|
$.bind($('form[name=delform]'), 'DOMNodeInserted', Main.node);
|
||||||
options.init();
|
options.init();
|
||||||
if (!$.get('firstrun')) {
|
if (!$.get('firstrun')) {
|
||||||
@ -3111,22 +3108,18 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
node: function(e) {
|
node: function(e) {
|
||||||
var callback, target, _i, _len, _ref, _results;
|
var target;
|
||||||
target = e.target;
|
target = e.target;
|
||||||
if (target.nodeName !== 'TABLE') {
|
if (target.nodeName !== 'TABLE') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_ref = g.callbacks;
|
return g.callbacks.forEach(function(callback) {
|
||||||
_results = [];
|
|
||||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
|
||||||
callback = _ref[_i];
|
|
||||||
try {
|
try {
|
||||||
nodes.forEach(callback);
|
return nodes.forEach(callback);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
return _results;
|
|
||||||
},
|
},
|
||||||
css: '\
|
css: '\
|
||||||
/* dialog styling */\
|
/* dialog styling */\
|
||||||
|
|||||||
@ -2357,12 +2357,11 @@ Main =
|
|||||||
expandComment.init()
|
expandComment.init()
|
||||||
|
|
||||||
nodes = $$ '.op, a + table'
|
nodes = $$ '.op, a + table'
|
||||||
for callback in g.callbacks
|
g.callbacks.forEach (callback) ->
|
||||||
try
|
try
|
||||||
nodes.forEach callback
|
nodes.forEach callback
|
||||||
catch err
|
catch err
|
||||||
alert err
|
alert err
|
||||||
continue
|
|
||||||
$.bind $('form[name=delform]'), 'DOMNodeInserted', Main.node
|
$.bind $('form[name=delform]'), 'DOMNodeInserted', Main.node
|
||||||
options.init()
|
options.init()
|
||||||
|
|
||||||
@ -2377,11 +2376,11 @@ Main =
|
|||||||
node: (e) ->
|
node: (e) ->
|
||||||
{target} = e
|
{target} = e
|
||||||
return unless target.nodeName is 'TABLE'
|
return unless target.nodeName is 'TABLE'
|
||||||
for callback in g.callbacks
|
g.callbacks.forEach (callback) ->
|
||||||
try
|
try
|
||||||
nodes.forEach callback
|
nodes.forEach callback
|
||||||
catch err
|
catch err
|
||||||
continue
|
#nothing
|
||||||
|
|
||||||
css: '
|
css: '
|
||||||
/* dialog styling */
|
/* dialog styling */
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user