Don't load iframe until original post form is opened.
This commit is contained in:
parent
0387642fcb
commit
78f7a0de42
@ -25,10 +25,15 @@ Captcha.replace =
|
|||||||
return unless (original = $ '#g-recaptcha, #captchaContainerAlt') and (noscript = $ 'noscript')
|
return unless (original = $ '#g-recaptcha, #captchaContainerAlt') and (noscript = $ 'noscript')
|
||||||
span = $.el 'span',
|
span = $.el 'span',
|
||||||
id: 'captcha-forced-noscript'
|
id: 'captcha-forced-noscript'
|
||||||
innerHTML: noscript.textContent
|
|
||||||
Captcha.replace.iframe $('iframe', span)
|
|
||||||
$.replace noscript, span
|
$.replace noscript, span
|
||||||
$.rm original
|
$.rm original
|
||||||
|
insert = ->
|
||||||
|
span.innerHTML = noscript.textContent
|
||||||
|
Captcha.replace.iframe $('iframe', span)
|
||||||
|
if (toggle = $ '#togglePostFormLink a, #form-link')
|
||||||
|
$.on toggle, 'click', insert
|
||||||
|
else
|
||||||
|
insert()
|
||||||
|
|
||||||
v1: ->
|
v1: ->
|
||||||
return unless $.id 'g-recaptcha'
|
return unless $.id 'g-recaptcha'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user