captcha reminder
This commit is contained in:
parent
2291b490da
commit
3a331f1547
@ -425,10 +425,21 @@ iframeLoad = ->
|
|||||||
remove(qr)
|
remove(qr)
|
||||||
|
|
||||||
|
|
||||||
submit = ->
|
submit = (e) ->
|
||||||
this.style.visibility = 'collapse'
|
if span = @nextSibling
|
||||||
if span = this.nextSibling
|
|
||||||
remove(span)
|
remove(span)
|
||||||
|
recaptcha = $('#recaptcha_response_field', this)
|
||||||
|
if not recaptcha.value
|
||||||
|
e.preventDefault()
|
||||||
|
span = make 'span', {
|
||||||
|
className: 'error'
|
||||||
|
textContent: 'You forgot to type in the verification.'
|
||||||
|
}
|
||||||
|
@parentNode.appendChild span
|
||||||
|
alert 'You forgot to type in the verification.'
|
||||||
|
recaptcha.focus()
|
||||||
|
else
|
||||||
|
@style.visibility = 'collapse'
|
||||||
|
|
||||||
|
|
||||||
minimize = ->
|
minimize = ->
|
||||||
|
|||||||
22
4chan_x.js
22
4chan_x.js
@ -462,10 +462,24 @@
|
|||||||
return remove(qr);
|
return remove(qr);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
submit = function() {
|
submit = function(e) {
|
||||||
var span;
|
var recaptcha, span;
|
||||||
this.style.visibility = 'collapse';
|
if (span = this.nextSibling) {
|
||||||
return (span = this.nextSibling) ? remove(span) : null;
|
remove(span);
|
||||||
|
}
|
||||||
|
recaptcha = $('#recaptcha_response_field', this);
|
||||||
|
if (!recaptcha.value) {
|
||||||
|
e.preventDefault();
|
||||||
|
span = make('span', {
|
||||||
|
className: 'error',
|
||||||
|
textContent: 'You forgot to type in the verification.'
|
||||||
|
});
|
||||||
|
this.parentNode.appendChild(span);
|
||||||
|
alert('You forgot to type in the verification.');
|
||||||
|
return recaptcha.focus();
|
||||||
|
} else {
|
||||||
|
return (this.style.visibility = 'collapse');
|
||||||
|
}
|
||||||
};
|
};
|
||||||
minimize = function() {
|
minimize = function() {
|
||||||
var form;
|
var form;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user