commit
4edf28ceb2
25
4chan_x.js
25
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,23 @@
|
|||||||
return _results;
|
return _results;
|
||||||
},
|
},
|
||||||
submit: function(e) {
|
submit: function(e) {
|
||||||
var form, isQR, recaptcha, span;
|
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 (g.REPLY && $('img.favicon').src === Favicon.empty) {
|
||||||
|
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) {
|
||||||
$.remove(span);
|
$.remove(span);
|
||||||
@ -1113,7 +1128,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;
|
||||||
@ -1125,7 +1140,7 @@
|
|||||||
cooldownCB: function() {
|
cooldownCB: function() {
|
||||||
var submit, submits, _i, _len;
|
var submit, submits, _i, _len;
|
||||||
qr.duration = qr.duration - 1;
|
qr.duration = qr.duration - 1;
|
||||||
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];
|
||||||
if (qr.duration === 0) {
|
if (qr.duration === 0) {
|
||||||
@ -1682,7 +1697,7 @@
|
|||||||
for (_i = 0, _len = arr.length; _i < _len; _i++) {
|
for (_i = 0, _len = arr.length; _i < _len; _i++) {
|
||||||
el = arr[_i];
|
el = arr[_i];
|
||||||
a = $.el('a', {
|
a = $.el('a', {
|
||||||
textContent: '[ ! ]'
|
innerHTML: '[ ! ]'
|
||||||
});
|
});
|
||||||
$.bind(a, 'click', quickReport.cb.report);
|
$.bind(a, 'click', quickReport.cb.report);
|
||||||
$.after(el, a);
|
$.after(el, a);
|
||||||
|
|||||||
@ -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='
|
||||||
@ -775,6 +776,16 @@ 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')
|
||||||
|
if g.REPLY and $('img.favicon').src is Favicon.empty
|
||||||
|
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
|
||||||
$.remove span
|
$.remove span
|
||||||
@ -855,7 +866,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
|
||||||
@ -865,7 +876,7 @@ qr =
|
|||||||
cooldownCB: ->
|
cooldownCB: ->
|
||||||
qr.duration = qr.duration - 1
|
qr.duration = qr.duration - 1
|
||||||
|
|
||||||
submits = $$ '#qr input[type=submit], form[name=post] input[type=submit]'
|
submits = $$ '#com_submit'
|
||||||
for submit in submits
|
for submit in submits
|
||||||
if qr.duration == 0
|
if qr.duration == 0
|
||||||
submit.disabled = false
|
submit.disabled = false
|
||||||
@ -1314,7 +1325,7 @@ quickReport =
|
|||||||
arr = $$ 'span[id^=no]', root
|
arr = $$ 'span[id^=no]', root
|
||||||
for el in arr
|
for el in arr
|
||||||
a = $.el 'a',
|
a = $.el 'a',
|
||||||
textContent: '[ ! ]'
|
innerHTML: '[ ! ]'
|
||||||
$.bind a, 'click', quickReport.cb.report
|
$.bind a, 'click', quickReport.cb.report
|
||||||
$.after el, a
|
$.after el, a
|
||||||
$.after el, $.tn(' ')
|
$.after el, $.tn(' ')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user