loading up the forgejo repo on tangled to test page performance
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Defer captcha script loading (#33919)

Fix #33899

(cherry picked from commit fdaf1cca65e118562b3cc2eb9e7c077b28f77213)

authored by

wxiaoguang and committed by
Gusted
839739fb 4ba5c957

+3 -3
+3 -3
templates/user/auth/captcha.tmpl
··· 11 11 <div class="inline field tw-text-center required"> 12 12 <div id="captcha" data-captcha-type="g-recaptcha" class="g-recaptcha-style" data-sitekey="{{.RecaptchaSitekey}}"></div> 13 13 </div> 14 - <script src='{{URLJoin .RecaptchaURL "api.js"}}'></script> 14 + <script defer src='{{URLJoin .RecaptchaURL "api.js"}}'></script> 15 15 {{else if eq .CaptchaType "hcaptcha"}} 16 16 <div class="inline field tw-text-center required"> 17 17 <div id="captcha" data-captcha-type="h-captcha" class="h-captcha-style" data-sitekey="{{.HcaptchaSitekey}}"></div> 18 18 </div> 19 - <script src='https://hcaptcha.com/1/api.js'></script> 19 + <script defer src='https://hcaptcha.com/1/api.js'></script> 20 20 {{else if eq .CaptchaType "mcaptcha"}} 21 21 <div class="inline field tw-text-center"> 22 22 <div class="m-captcha-style" id="mcaptcha__widget-container"></div> ··· 26 26 <div class="inline field tw-text-center"> 27 27 <div id="captcha" data-captcha-type="cf-turnstile" data-sitekey="{{.CfTurnstileSitekey}}"></div> 28 28 </div> 29 - <script src='https://challenges.cloudflare.com/turnstile/v0/api.js'></script> 29 + <script defer src='https://challenges.cloudflare.com/turnstile/v0/api.js'></script> 30 30 {{end}}{{end}}