Merge pull request #2703 from overleaf/ew-only-include-recaptcha-on-pages-that-use-it

only include recaptcha v2 on pages that use it

GitOrigin-RevId: 98b4e3add8e0a5a0b74530bf4155ebb47f69ba96
This commit is contained in:
nate stemen 2020-03-30 14:04:30 -04:00 committed by Copybot
parent bdbbe1d596
commit 78561cb393

View file

@ -90,18 +90,9 @@ html(
body
if(settings.recaptcha && (settings.recaptcha.siteKey || settings.recaptcha.siteKeyV3))
if (settings.recaptcha.siteKeyV3)
script(src="https://www.google.com/recaptcha/api.js?render="+settings.recaptcha.siteKeyV3)
else
script(src="https://www.google.com/recaptcha/api.js?render=explicit")
div(
id="recaptcha"
class="g-recaptcha"
data-sitekey=settings.recaptcha.siteKey
data-size="invisible"
data-badge="inline"
)
if(settings.recaptcha && settings.recaptcha.siteKeyV3)
script(src="https://www.google.com/recaptcha/api.js?render="+settings.recaptcha.siteKeyV3)
- if(typeof(suppressNavbar) == "undefined")
include layout/navbar