auto watch reply

This commit is contained in:
James Campos 2011-09-03 13:45:38 -07:00
parent daa1e0da3a
commit bc62b6524c
2 changed files with 14 additions and 2 deletions

View File

@ -1455,7 +1455,7 @@
return QR.attachNext(); return QR.attachNext();
}, },
submit: function(e) { submit: function(e) {
var captcha, challenge, el, qr, response; var captcha, challenge, el, id, op, qr, response;
if (!($('textarea', QR.qr).value || $('[type=file]', QR.qr).files.length)) { if (!($('textarea', QR.qr).value || $('[type=file]', QR.qr).files.length)) {
if (e) { if (e) {
alert('Error: No text entered.'); alert('Error: No text entered.');
@ -1484,7 +1484,14 @@
if (!e) { if (!e) {
$('#qr_form', qr).submit(); $('#qr_form', qr).submit();
} }
return QR.sage = /sage/i.test($('[name=email]', qr).value); QR.sage = /sage/i.test($('[name=email]', qr).value);
if (conf['Thread Watcher'] && conf['Auto Watch Reply']) {
id = $('input[name=resto]', qr.el).value;
op = $.id(id);
if ($('img.favicon', op).src === Favicon.empty) {
return watcher.watch(op, id);
}
}
}, },
sys: function() { sys: function() {
return $.globalEval(function() { return $.globalEval(function() {

View File

@ -1159,6 +1159,11 @@ QR =
$('#autohide', qr).checked = true if conf['Auto Hide QR'] $('#autohide', qr).checked = true if conf['Auto Hide QR']
$('#qr_form', qr).submit() if not e $('#qr_form', qr).submit() if not e
QR.sage = /sage/i.test $('[name=email]', qr).value QR.sage = /sage/i.test $('[name=email]', qr).value
if conf['Thread Watcher'] and conf['Auto Watch Reply']
id = $('input[name=resto]', qr.el).value
op = $.id id
if $('img.favicon', op).src is Favicon.empty
watcher.watch op, id
sys: -> sys: ->
$.globalEval -> $.globalEval ->
if node = document.querySelector('table font b')?.firstChild if node = document.querySelector('table font b')?.firstChild