Close #712
This commit is contained in:
parent
6b4e55d727
commit
91b5a0ae67
@ -4930,11 +4930,23 @@
|
|||||||
case 'sys.4chan.org':
|
case 'sys.4chan.org':
|
||||||
if (/report/.test(location.search)) {
|
if (/report/.test(location.search)) {
|
||||||
$.ready(function() {
|
$.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) {
|
if (e.keyCode === 8 && !e.target.value) {
|
||||||
return window.location = 'javascript:Recaptcha.reload()';
|
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;
|
return;
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
master
|
master
|
||||||
- Mayhem
|
- Mayhem
|
||||||
|
One-word-captcha now works in the report window.
|
||||||
Fix duplicate file upload error link.
|
Fix duplicate file upload error link.
|
||||||
|
|
||||||
2.34.8
|
2.34.8
|
||||||
|
|||||||
@ -3855,8 +3855,15 @@ Main =
|
|||||||
when 'sys.4chan.org'
|
when 'sys.4chan.org'
|
||||||
if /report/.test location.search
|
if /report/.test location.search
|
||||||
$.ready ->
|
$.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
|
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
|
return
|
||||||
when 'images.4chan.org'
|
when 'images.4chan.org'
|
||||||
$.ready ->
|
$.ready ->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user