Prevent 4chan from hiding the default captcha controls.
Also don't show image in QR in case of audio captcha selection.
This commit is contained in:
parent
dcc70d9fd6
commit
132a75b800
@ -108,6 +108,9 @@ hr + div.center:not(.ad-cnt):not(.topad):not(.middlead):not(.bottomad) {
|
|||||||
:root:not(.js-enabled) #postForm {
|
:root:not(.js-enabled) #postForm {
|
||||||
display: table;
|
display: table;
|
||||||
}
|
}
|
||||||
|
#captchaContainerAlt td:nth-child(2) {
|
||||||
|
display: table-cell !important;
|
||||||
|
}
|
||||||
|
|
||||||
/* Anti-autoplay */
|
/* Anti-autoplay */
|
||||||
audio.controls-added {
|
audio.controls-added {
|
||||||
|
|||||||
@ -167,6 +167,9 @@ Captcha.v1 =
|
|||||||
$.set 'captchas', @captchas
|
$.set 'captchas', @captchas
|
||||||
|
|
||||||
load: ->
|
load: ->
|
||||||
|
if $('#captchaContainerAlt[class~="recaptcha_is_showing_audio"]')
|
||||||
|
@nodes.img.hidden = true
|
||||||
|
return
|
||||||
return unless @nodes.challenge.firstChild
|
return unless @nodes.challenge.firstChild
|
||||||
return unless challenge_image = $.id 'recaptcha_challenge_image'
|
return unless challenge_image = $.id 'recaptcha_challenge_image'
|
||||||
# -1 minute to give upload some time.
|
# -1 minute to give upload some time.
|
||||||
@ -174,7 +177,8 @@ Captcha.v1 =
|
|||||||
challenge = @nodes.challenge.firstChild.value
|
challenge = @nodes.challenge.firstChild.value
|
||||||
@nodes.img.alt = challenge
|
@nodes.img.alt = challenge
|
||||||
@nodes.img.src = challenge_image.src
|
@nodes.img.src = challenge_image.src
|
||||||
@nodes.input.value = null
|
@nodes.img.hidden = false
|
||||||
|
@nodes.input.value = ''
|
||||||
@clear()
|
@clear()
|
||||||
|
|
||||||
count: ->
|
count: ->
|
||||||
@ -191,9 +195,15 @@ Captcha.v1 =
|
|||||||
@nodes.input.alt = count # For XTRM RICE.
|
@nodes.input.alt = count # For XTRM RICE.
|
||||||
|
|
||||||
reload: (focus) ->
|
reload: (focus) ->
|
||||||
# Hack to prevent the input from being focused
|
# Recaptcha.should_focus = false: Hack to prevent the input from being focused
|
||||||
$.globalEval 'Recaptcha.reload(); Recaptcha.should_focus = false;'
|
$.globalEval '''
|
||||||
# Focus if we meant to.
|
if (window.Recaptcha.type === "image") {
|
||||||
|
window.Recaptcha.reload();
|
||||||
|
} else {
|
||||||
|
window.Recaptcha.switch_type("image");
|
||||||
|
}
|
||||||
|
window.Recaptcha.should_focus = false;
|
||||||
|
'''
|
||||||
@nodes.input.focus() if focus
|
@nodes.input.focus() if focus
|
||||||
|
|
||||||
keydown: (e) ->
|
keydown: (e) ->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user