error out at start if no #navtopr
attempt to add options to #navtopr at start, erroring out on failure. do this so we don't add the thread watcher and waste time in general.
This commit is contained in:
parent
9610c0f6f0
commit
b4a6c8b35e
@ -654,6 +654,15 @@ replyNav: ->
|
|||||||
window.location: "#$op"
|
window.location: "#$op"
|
||||||
|
|
||||||
|
|
||||||
|
#error out if there's no #navtopr.
|
||||||
|
text: $('#navtopr a').nextSibling
|
||||||
|
a: tag('a')
|
||||||
|
a.textContent: 'X'
|
||||||
|
a.className: 'pointer'
|
||||||
|
a.addEventListener('click', options, true)
|
||||||
|
inBefore(text, document.createTextNode(' / '))
|
||||||
|
inBefore(text, a)
|
||||||
|
|
||||||
if getValue('Reply Hiding')
|
if getValue('Reply Hiding')
|
||||||
callbacks.push((root) ->
|
callbacks.push((root) ->
|
||||||
tds: $$('td.doubledash', root)
|
tds: $$('td.doubledash', root)
|
||||||
@ -820,14 +829,6 @@ if not REPLY
|
|||||||
for a in as
|
for a in as
|
||||||
a.addEventListener('click', expandComment, true)
|
a.addEventListener('click', expandComment, true)
|
||||||
|
|
||||||
a: tag('a')
|
|
||||||
a.textContent: 'X'
|
|
||||||
a.className: 'pointer'
|
|
||||||
a.addEventListener('click', options, true)
|
|
||||||
text: $('#navtopr a').nextSibling
|
|
||||||
inBefore(text, document.createTextNode(' / '))
|
|
||||||
inBefore(text, a)
|
|
||||||
|
|
||||||
for callback in callbacks
|
for callback in callbacks
|
||||||
callback()
|
callback()
|
||||||
document.body.addEventListener('DOMNodeInserted', nodeInserted, true)
|
document.body.addEventListener('DOMNodeInserted', nodeInserted, true)
|
||||||
|
|||||||
19
4chan_x.js
19
4chan_x.js
@ -742,8 +742,16 @@ cursor: pointer; \
|
|||||||
return window.location;
|
return window.location;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
//error out if there's no #navtopr.
|
||||||
|
text = $('#navtopr a').nextSibling;
|
||||||
|
a = tag('a');
|
||||||
|
a.textContent = 'X';
|
||||||
|
a.className = 'pointer';
|
||||||
|
a.addEventListener('click', options, true);
|
||||||
|
inBefore(text, document.createTextNode(' / '));
|
||||||
|
inBefore(text, a);
|
||||||
getValue('Reply Hiding') ? callbacks.push(function(root) {
|
getValue('Reply Hiding') ? callbacks.push(function(root) {
|
||||||
var _c, _d, _e, _f, _g, _h, _i, _j, a, next, obj, td, tds;
|
var _c, _d, _e, _f, _g, _h, _i, _j, next, obj, td, tds;
|
||||||
tds = $$('td.doubledash', root);
|
tds = $$('td.doubledash', root);
|
||||||
_c = []; _e = tds;
|
_c = []; _e = tds;
|
||||||
for (_d = 0, _f = _e.length; _d < _f; _d++) {
|
for (_d = 0, _f = _e.length; _d < _f; _d++) {
|
||||||
@ -784,7 +792,7 @@ cursor: pointer; \
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
getValue('Quick Report') ? callbacks.push(function(root) {
|
getValue('Quick Report') ? callbacks.push(function(root) {
|
||||||
var _c, _d, _e, _f, a, arr, el;
|
var _c, _d, _e, _f, arr, el;
|
||||||
arr = $$('span[id^=no]', root);
|
arr = $$('span[id^=no]', root);
|
||||||
_c = []; _e = arr;
|
_c = []; _e = arr;
|
||||||
for (_d = 0, _f = _e.length; _d < _f; _d++) {
|
for (_d = 0, _f = _e.length; _d < _f; _d++) {
|
||||||
@ -944,13 +952,6 @@ cursor: pointer; \
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
a = tag('a');
|
|
||||||
a.textContent = 'X';
|
|
||||||
a.className = 'pointer';
|
|
||||||
a.addEventListener('click', options, true);
|
|
||||||
text = $('#navtopr a').nextSibling;
|
|
||||||
inBefore(text, document.createTextNode(' / '));
|
|
||||||
inBefore(text, a);
|
|
||||||
_s = callbacks;
|
_s = callbacks;
|
||||||
for (_r = 0, _t = _s.length; _r < _t; _r++) {
|
for (_r = 0, _t = _s.length; _r < _t; _r++) {
|
||||||
callback = _s[_r];
|
callback = _s[_r];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user