Don't setup captcha before captchas array exists.
This commit is contained in:
parent
2762363093
commit
54ef84b372
@ -11,8 +11,6 @@ Captcha.v1 =
|
|||||||
hidden: true
|
hidden: true
|
||||||
$.add d.body, captchaContainer
|
$.add d.body, captchaContainer
|
||||||
|
|
||||||
@setup() if Conf['Auto-load captcha']
|
|
||||||
|
|
||||||
imgContainer = $.el 'div',
|
imgContainer = $.el 'div',
|
||||||
className: 'captcha-img'
|
className: 'captcha-img'
|
||||||
title: 'Reload reCAPTCHA'
|
title: 'Reload reCAPTCHA'
|
||||||
@ -43,7 +41,7 @@ Captcha.v1 =
|
|||||||
new MutationObserver(@afterSetup).observe $.id('captchaContainer'), childList: true
|
new MutationObserver(@afterSetup).observe $.id('captchaContainer'), childList: true
|
||||||
|
|
||||||
@beforeSetup()
|
@beforeSetup()
|
||||||
@afterSetup() # reCAPTCHA might have loaded before the QR.
|
@setup() if Conf['Auto-load captcha']
|
||||||
|
|
||||||
cb:
|
cb:
|
||||||
focus: -> QR.captcha.setup false, true
|
focus: -> QR.captcha.setup false, true
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user