wait for captcha image to exist before trying to check the URL
This commit is contained in:
parent
a24086828c
commit
3bd7003820
@ -110,11 +110,12 @@ QR.captcha =
|
||||
|
||||
load: ->
|
||||
return unless @nodes.challenge.firstChild
|
||||
return unless challenge_image = $.id 'recaptcha_challenge_image'
|
||||
# -1 minute to give upload some time.
|
||||
@timeout = Date.now() + @lifetime * $.SECOND - $.MINUTE
|
||||
challenge = @nodes.challenge.firstChild.value
|
||||
@nodes.img.alt = challenge
|
||||
@nodes.img.src = $.id('recaptcha_challenge_image').src
|
||||
@nodes.img.src = challenge_image.src
|
||||
@nodes.input.value = null
|
||||
@clear()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user