try / catch
This commit is contained in:
parent
a3b1483052
commit
2f2104a672
@ -2966,7 +2966,7 @@
|
|||||||
};
|
};
|
||||||
Main = {
|
Main = {
|
||||||
init: function() {
|
init: function() {
|
||||||
var cutoff, hiddenThreads, id, lastChecked, nodes, now, timestamp, tzOffset, _ref;
|
var callback, cutoff, hiddenThreads, id, lastChecked, nodes, now, timestamp, tzOffset, _i, _len, _ref, _ref2;
|
||||||
$.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();
|
||||||
@ -3096,9 +3096,16 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
nodes = $$('.op, a + table');
|
nodes = $$('.op, a + table');
|
||||||
g.callbacks.forEach(function(callback) {
|
_ref2 = g.callbacks;
|
||||||
return nodes.forEach(callback);
|
for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
|
||||||
});
|
callback = _ref2[_i];
|
||||||
|
try {
|
||||||
|
nodes.forEach(callback);
|
||||||
|
} catch (e) {
|
||||||
|
alert(e);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
$.bind($('form[name=delform]'), 'DOMNodeInserted', nodeInserted);
|
$.bind($('form[name=delform]'), 'DOMNodeInserted', nodeInserted);
|
||||||
options.init();
|
options.init();
|
||||||
if (!$.get('firstrun')) {
|
if (!$.get('firstrun')) {
|
||||||
|
|||||||
@ -2362,7 +2362,12 @@ Main =
|
|||||||
expandComment.init()
|
expandComment.init()
|
||||||
|
|
||||||
nodes = $$ '.op, a + table'
|
nodes = $$ '.op, a + table'
|
||||||
g.callbacks.forEach (callback) -> nodes.forEach callback
|
for callback in g.callbacks
|
||||||
|
try
|
||||||
|
nodes.forEach callback
|
||||||
|
catch e
|
||||||
|
alert e
|
||||||
|
continue
|
||||||
$.bind $('form[name=delform]'), 'DOMNodeInserted', nodeInserted
|
$.bind $('form[name=delform]'), 'DOMNodeInserted', nodeInserted
|
||||||
options.init()
|
options.init()
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user