Finish watch thread on reply.
This commit is contained in:
parent
c669c7a128
commit
85516f8c9e
16
4chan_x.js
16
4chan_x.js
@ -1023,12 +1023,22 @@
|
|||||||
return _results;
|
return _results;
|
||||||
},
|
},
|
||||||
submit: function(e) {
|
submit: function(e) {
|
||||||
var form, isQR, recaptcha, span, value;
|
var form, isQR, recaptcha, span, thread, threads, value, _i, _len;
|
||||||
form = e.target;
|
form = e.target;
|
||||||
isQR = form.parentNode.id === 'qr';
|
isQR = form.parentNode.id === 'qr';
|
||||||
if ($.config('Watch on Reply') && $.config('Thread Watcher')) {
|
if ($.config('Watch on Reply') && $.config('Thread Watcher')) {
|
||||||
value = g.THREAD_ID || $('input[name=resto]').value;
|
if (g.REPLY && $('img.favicon').src === Favicon.empty) {
|
||||||
watcher.watch(null, value);
|
watcher.watch(null, g.THREAD_ID);
|
||||||
|
} else {
|
||||||
|
value = $('input[name=resto]').value;
|
||||||
|
threads = $$('div.op');
|
||||||
|
for (_i = 0, _len = threads.length; _i < _len; _i++) {
|
||||||
|
thread = threads[_i];
|
||||||
|
if (thread.id === value && $('img.favicon', thread).src === Favicon.empty) {
|
||||||
|
watcher.watch(thread, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (isQR) {
|
if (isQR) {
|
||||||
if (span = this.nextSibling) {
|
if (span = this.nextSibling) {
|
||||||
|
|||||||
@ -776,8 +776,14 @@ qr =
|
|||||||
isQR = form.parentNode.id == 'qr'
|
isQR = form.parentNode.id == 'qr'
|
||||||
|
|
||||||
if $.config('Watch on Reply') and $.config('Thread Watcher')
|
if $.config('Watch on Reply') and $.config('Thread Watcher')
|
||||||
value = g.THREAD_ID or $('input[name=resto]').value
|
if g.REPLY and $('img.favicon').src is Favicon.empty
|
||||||
watcher.watch null, value
|
watcher.watch null, g.THREAD_ID
|
||||||
|
else
|
||||||
|
value = $('input[name=resto]').value
|
||||||
|
threads = $$ 'div.op'
|
||||||
|
for thread in threads
|
||||||
|
if thread.id is value and $('img.favicon', thread).src is Favicon.empty
|
||||||
|
watcher.watch thread, value
|
||||||
|
|
||||||
if isQR
|
if isQR
|
||||||
if span = @nextSibling
|
if span = @nextSibling
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user