enable autopost if submit attempt during cooldown; fix #265
This commit is contained in:
parent
c3ba138dfd
commit
122c2d2001
@ -1708,10 +1708,12 @@
|
||||
submit: function(e) {
|
||||
var captcha, challenge, el, id, input, op, qr, response;
|
||||
qr = QR.qr;
|
||||
if ($('form button', qr).disabled) {
|
||||
return;
|
||||
}
|
||||
if (!($('textarea', qr).value || $('#files', qr).childNodes.length)) {
|
||||
if ($('textarea', qr).value || $('#files', qr).childNodes.length) {
|
||||
if ($('form button', qr).disabled) {
|
||||
$('#autopost', qr).checked = true;
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if (e) {
|
||||
alert('Error: No text entered.');
|
||||
e.preventDefault();
|
||||
|
||||
@ -1265,9 +1265,12 @@ QR =
|
||||
$('textarea', QR.qr).value = ''
|
||||
submit: (e) ->
|
||||
{qr} = QR
|
||||
return if $('form button', qr).disabled
|
||||
#XXX e is undefined if method is called explicitly, eg, from auto posting
|
||||
unless $('textarea', qr).value or $('#files', qr).childNodes.length
|
||||
if $('textarea', qr).value or $('#files', qr).childNodes.length
|
||||
if $('form button', qr).disabled
|
||||
$('#autopost', qr).checked = true
|
||||
return
|
||||
else
|
||||
if e
|
||||
alert 'Error: No text entered.'
|
||||
e.preventDefault()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user