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) {
|
submit: function(e) {
|
||||||
var captcha, challenge, el, id, input, op, qr, response;
|
var captcha, challenge, el, id, input, op, qr, response;
|
||||||
qr = QR.qr;
|
qr = QR.qr;
|
||||||
if ($('form button', qr).disabled) {
|
if ($('textarea', qr).value || $('#files', qr).childNodes.length) {
|
||||||
return;
|
if ($('form button', qr).disabled) {
|
||||||
}
|
$('#autopost', qr).checked = true;
|
||||||
if (!($('textarea', qr).value || $('#files', qr).childNodes.length)) {
|
return;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
if (e) {
|
if (e) {
|
||||||
alert('Error: No text entered.');
|
alert('Error: No text entered.');
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|||||||
@ -1265,9 +1265,12 @@ QR =
|
|||||||
$('textarea', QR.qr).value = ''
|
$('textarea', QR.qr).value = ''
|
||||||
submit: (e) ->
|
submit: (e) ->
|
||||||
{qr} = QR
|
{qr} = QR
|
||||||
return if $('form button', qr).disabled
|
|
||||||
#XXX e is undefined if method is called explicitly, eg, from auto posting
|
#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
|
if e
|
||||||
alert 'Error: No text entered.'
|
alert 'Error: No text entered.'
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user