Close #712
This commit is contained in:
parent
6b4e55d727
commit
91b5a0ae67
@ -4930,11 +4930,23 @@
|
||||
case 'sys.4chan.org':
|
||||
if (/report/.test(location.search)) {
|
||||
$.ready(function() {
|
||||
return $.on($.id('recaptcha_response_field'), 'keydown', function(e) {
|
||||
var field, form;
|
||||
form = $('form');
|
||||
field = $.id('recaptcha_response_field');
|
||||
$.on(field, 'keydown', function(e) {
|
||||
if (e.keyCode === 8 && !e.target.value) {
|
||||
return window.location = 'javascript:Recaptcha.reload()';
|
||||
}
|
||||
});
|
||||
return $.on(form, 'submit', function(e) {
|
||||
var response;
|
||||
e.preventDefault();
|
||||
response = field.value.trim();
|
||||
if (!/\s/.test(response)) {
|
||||
field.value = "" + response + " " + response;
|
||||
}
|
||||
return form.submit();
|
||||
});
|
||||
});
|
||||
}
|
||||
return;
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
master
|
||||
- Mayhem
|
||||
One-word-captcha now works in the report window.
|
||||
Fix duplicate file upload error link.
|
||||
|
||||
2.34.8
|
||||
|
||||
@ -3855,8 +3855,15 @@ Main =
|
||||
when 'sys.4chan.org'
|
||||
if /report/.test location.search
|
||||
$.ready ->
|
||||
$.on $.id('recaptcha_response_field'), 'keydown', (e) ->
|
||||
form = $ 'form'
|
||||
field = $.id 'recaptcha_response_field'
|
||||
$.on field, 'keydown', (e) ->
|
||||
window.location = 'javascript:Recaptcha.reload()' if e.keyCode is 8 and not e.target.value
|
||||
$.on form, 'submit', (e) ->
|
||||
e.preventDefault()
|
||||
response = field.value.trim()
|
||||
field.value = "#{response} #{response}" unless /\s/.test response
|
||||
form.submit()
|
||||
return
|
||||
when 'images.4chan.org'
|
||||
$.ready ->
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user