mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-04-25 04:57:31 +00:00
Defer captcha script loading (#33919)
Fix #33899 (cherry picked from commit fdaf1cca65e118562b3cc2eb9e7c077b28f77213)
This commit is contained in:
parent
4ba5c957e0
commit
839739fb71
1 changed files with 3 additions and 3 deletions
|
@ -11,12 +11,12 @@
|
|||
<div class="inline field tw-text-center required">
|
||||
<div id="captcha" data-captcha-type="g-recaptcha" class="g-recaptcha-style" data-sitekey="{{.RecaptchaSitekey}}"></div>
|
||||
</div>
|
||||
<script src='{{URLJoin .RecaptchaURL "api.js"}}'></script>
|
||||
<script defer src='{{URLJoin .RecaptchaURL "api.js"}}'></script>
|
||||
{{else if eq .CaptchaType "hcaptcha"}}
|
||||
<div class="inline field tw-text-center required">
|
||||
<div id="captcha" data-captcha-type="h-captcha" class="h-captcha-style" data-sitekey="{{.HcaptchaSitekey}}"></div>
|
||||
</div>
|
||||
<script src='https://hcaptcha.com/1/api.js'></script>
|
||||
<script defer src='https://hcaptcha.com/1/api.js'></script>
|
||||
{{else if eq .CaptchaType "mcaptcha"}}
|
||||
<div class="inline field tw-text-center">
|
||||
<div class="m-captcha-style" id="mcaptcha__widget-container"></div>
|
||||
|
@ -26,5 +26,5 @@
|
|||
<div class="inline field tw-text-center">
|
||||
<div id="captcha" data-captcha-type="cf-turnstile" data-sitekey="{{.CfTurnstileSitekey}}"></div>
|
||||
</div>
|
||||
<script src='https://challenges.cloudflare.com/turnstile/v0/api.js'></script>
|
||||
<script defer src='https://challenges.cloudflare.com/turnstile/v0/api.js'></script>
|
||||
{{end}}{{end}}
|
||||
|
|
Loading…
Add table
Reference in a new issue