Simplify.

This commit is contained in:
Nicolas Stepien 2011-06-28 01:32:52 +02:00
parent cc521fbe16
commit 0d8f6c302b
2 changed files with 6 additions and 15 deletions

View File

@ -1301,9 +1301,7 @@
return $.bind(quote, 'click', qr.cb.quote);
},
submit: function(e) {
var form, id, isQR, op;
form = this;
isQR = form.parentNode.id === 'qr';
var id, op;
if ($.config('Auto Watch Reply') && $.config('Thread Watcher')) {
if (g.REPLY && $('img.favicon').src === Favicon.empty) {
watcher.watch(null, g.THREAD_ID);
@ -1315,12 +1313,10 @@
}
}
}
if (isQR) {
if (this.id === 'qr_form') {
$('#error').textContent = '';
}
qr.sage = /sage/i.test($('input[name=email]', form).value);
if (isQR) {
return qr.autohide.set();
qr.autohide.set();
return qr.sage = /sage/i.test($('input[name=email]', this).value);
}
},
quote: function(e) {

View File

@ -1020,9 +1020,6 @@ qr =
$.bind quote, 'click', qr.cb.quote
submit: (e) ->
form = @
isQR = form.parentNode.id == 'qr'
if $.config('Auto Watch Reply') and $.config('Thread Watcher')
if g.REPLY and $('img.favicon').src is Favicon.empty
watcher.watch null, g.THREAD_ID
@ -1032,12 +1029,10 @@ qr =
if $('img.favicon', op).src is Favicon.empty
watcher.watch op, id
if isQR
if @id is 'qr_form' #Quick Replying
$('#error').textContent = ''
qr.sage = /sage/i.test $('input[name=email]', form).value
if isQR
qr.autohide.set()
qr.sage = /sage/i.test $('input[name=email]', @).value
quote: (e) ->
e.preventDefault()