Don't load iframe until original post form is opened.

This commit is contained in:
ccd0 2015-11-20 10:35:02 -08:00
parent 0387642fcb
commit 78f7a0de42

View File

@ -25,10 +25,15 @@ Captcha.replace =
return unless (original = $ '#g-recaptcha, #captchaContainerAlt') and (noscript = $ 'noscript')
span = $.el 'span',
id: 'captcha-forced-noscript'
innerHTML: noscript.textContent
Captcha.replace.iframe $('iframe', span)
$.replace noscript, span
$.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: ->
return unless $.id 'g-recaptcha'