Start work for watch thread on reply.
This commit is contained in:
parent
0802720a6f
commit
43617c6db9
11
4chan_x.js
11
4chan_x.js
@ -91,7 +91,8 @@
|
|||||||
'Thread Navigation': [true, 'Navigate to previous / next thread'],
|
'Thread Navigation': [true, 'Navigate to previous / next thread'],
|
||||||
'Thread Updater': [true, 'Update threads'],
|
'Thread Updater': [true, 'Update threads'],
|
||||||
'Thread Watcher': [true, 'Bookmark threads'],
|
'Thread Watcher': [true, 'Bookmark threads'],
|
||||||
'Unread Count': [true, 'Show unread post count in tab title']
|
'Unread Count': [true, 'Show unread post count in tab title'],
|
||||||
|
'Watch on Reply': [false, 'Automatically watch threads you reply to']
|
||||||
},
|
},
|
||||||
textarea: {
|
textarea: {
|
||||||
flavors: ['http://regex.info/exif.cgi?url=', 'http://iqdb.org/?url=', 'http://tineye.com/search?url=', '#http://saucenao.com/search.php?db=999&url='].join('\n')
|
flavors: ['http://regex.info/exif.cgi?url=', 'http://iqdb.org/?url=', 'http://tineye.com/search?url=', '#http://saucenao.com/search.php?db=999&url='].join('\n')
|
||||||
@ -1022,9 +1023,13 @@
|
|||||||
return _results;
|
return _results;
|
||||||
},
|
},
|
||||||
submit: function(e) {
|
submit: function(e) {
|
||||||
var form, isQR, recaptcha, span;
|
var form, isQR, recaptcha, span, value;
|
||||||
form = e.target;
|
form = e.target;
|
||||||
isQR = form.parentNode.id === 'qr';
|
isQR = form.parentNode.id === 'qr';
|
||||||
|
if ($.config('Watch on Reply') && $.config('Thread Watcher')) {
|
||||||
|
value = g.THREAD_ID || $('input[name=resto]').value;
|
||||||
|
watcher.watch(null, value);
|
||||||
|
}
|
||||||
if (isQR) {
|
if (isQR) {
|
||||||
if (span = this.nextSibling) {
|
if (span = this.nextSibling) {
|
||||||
$.remove(span);
|
$.remove(span);
|
||||||
@ -1113,7 +1118,7 @@
|
|||||||
},
|
},
|
||||||
cooldownStart: function(duration) {
|
cooldownStart: function(duration) {
|
||||||
var submit, submits, _i, _len;
|
var submit, submits, _i, _len;
|
||||||
submits = $$('#qr input[type=submit], form[name=post] input[type=submit]');
|
submits = $$('#com_submit');
|
||||||
for (_i = 0, _len = submits.length; _i < _len; _i++) {
|
for (_i = 0, _len = submits.length; _i < _len; _i++) {
|
||||||
submit = submits[_i];
|
submit = submits[_i];
|
||||||
submit.value = duration;
|
submit.value = duration;
|
||||||
|
|||||||
@ -36,6 +36,7 @@ config =
|
|||||||
'Thread Updater': [true, 'Update threads']
|
'Thread Updater': [true, 'Update threads']
|
||||||
'Thread Watcher': [true, 'Bookmark threads']
|
'Thread Watcher': [true, 'Bookmark threads']
|
||||||
'Unread Count': [true, 'Show unread post count in tab title']
|
'Unread Count': [true, 'Show unread post count in tab title']
|
||||||
|
'Watch on Reply': [false, 'Automatically watch threads you reply to']
|
||||||
textarea:
|
textarea:
|
||||||
flavors: [
|
flavors: [
|
||||||
'http://regex.info/exif.cgi?url='
|
'http://regex.info/exif.cgi?url='
|
||||||
@ -774,6 +775,10 @@ qr =
|
|||||||
form = e.target
|
form = e.target
|
||||||
isQR = form.parentNode.id == 'qr'
|
isQR = form.parentNode.id == 'qr'
|
||||||
|
|
||||||
|
if $.config('Watch on Reply') and $.config('Thread Watcher')
|
||||||
|
value = g.THREAD_ID or $('input[name=resto]').value
|
||||||
|
watcher.watch null, value
|
||||||
|
|
||||||
if isQR
|
if isQR
|
||||||
if span = @nextSibling
|
if span = @nextSibling
|
||||||
$.remove span
|
$.remove span
|
||||||
@ -854,7 +859,7 @@ qr =
|
|||||||
return true
|
return true
|
||||||
|
|
||||||
cooldownStart: (duration) ->
|
cooldownStart: (duration) ->
|
||||||
submits = $$ '#qr input[type=submit], form[name=post] input[type=submit]'
|
submits = $$ '#com_submit'
|
||||||
for submit in submits
|
for submit in submits
|
||||||
submit.value = duration
|
submit.value = duration
|
||||||
submit.disabled = true
|
submit.disabled = true
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user