captcha reminder
This commit is contained in:
parent
2291b490da
commit
3a331f1547
@ -425,10 +425,21 @@ iframeLoad = ->
|
||||
remove(qr)
|
||||
|
||||
|
||||
submit = ->
|
||||
this.style.visibility = 'collapse'
|
||||
if span = this.nextSibling
|
||||
submit = (e) ->
|
||||
if span = @nextSibling
|
||||
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 = ->
|
||||
|
||||
22
4chan_x.js
22
4chan_x.js
@ -462,10 +462,24 @@
|
||||
return remove(qr);
|
||||
}
|
||||
};
|
||||
submit = function() {
|
||||
var span;
|
||||
this.style.visibility = 'collapse';
|
||||
return (span = this.nextSibling) ? remove(span) : null;
|
||||
submit = function(e) {
|
||||
var recaptcha, span;
|
||||
if (span = this.nextSibling) {
|
||||
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() {
|
||||
var form;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user