mirror of
https://github.com/go-gitea/gitea.git
synced 2026-05-25 16:08:46 +09:00
After using CSP nonce, the "onerror" doesn't work anymore. Change it to use a global variable to detect Also help users like #37379 to catch errors more easily. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
19 lines
519 B
Handlebars
19 lines
519 B
Handlebars
{{if false}}
|
|
{{/* to make html structure "likely" complete to prevent IDE warnings */}}
|
|
<html>
|
|
<body>
|
|
<div>
|
|
{{end}}
|
|
|
|
{{template "custom/body_inner_post" .}}
|
|
</div>
|
|
{{template "custom/body_outer_post" .}}
|
|
{{template "base/footer_content" .}}
|
|
{{ctx.ScriptImport "js/index.js" "module"}}
|
|
{{template "custom/footer" .}}
|
|
<script nonce="{{ctx.CspScriptNonce}}" type="module">
|
|
if (!window.config?.frontendInited) alert("Frontend is not initialized, check console errors or asset files.")
|
|
</script>
|
|
</body>
|
|
</html>
|