app: Add the JS warnings to index_local.html

This commit is contained in:
Valentin Tolmer 2023-08-05 21:47:31 +02:00 committed by nitnelave
parent 6d796df097
commit 70bbe7f5ad
2 changed files with 37 additions and 22 deletions

View File

@ -15,8 +15,8 @@
src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/js/bootstrap.bundle.min.js" src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/js/bootstrap.bundle.min.js"
integrity="sha384-/bQdsTh/da6pkI1MST/rWKFNjaCP5gBSY4sEBT38Q/9RBh9AH40zEOg7Hlq2THRZ" integrity="sha384-/bQdsTh/da6pkI1MST/rWKFNjaCP5gBSY4sEBT38Q/9RBh9AH40zEOg7Hlq2THRZ"
crossorigin="anonymous"></script> crossorigin="anonymous"></script>
<script <script
src="https://cdn.jsdelivr.net/npm/bootstrap-dark-5@1.1.3/dist/js/darkmode.min.js" src="https://cdn.jsdelivr.net/npm/bootstrap-dark-5@1.1.3/dist/js/darkmode.min.js"
integrity="sha384-A4SLs39X/aUfwRclRaXvNeXNBTLZdnZdHhhteqbYFS2jZTRD79tKeFeBn7SGXNpi" integrity="sha384-A4SLs39X/aUfwRclRaXvNeXNBTLZdnZdHhhteqbYFS2jZTRD79tKeFeBn7SGXNpi"
crossorigin="anonymous"></script> crossorigin="anonymous"></script>
<link <link
@ -43,25 +43,23 @@
</head> </head>
<body> <body>
<noscript> <noscript>
<!-- <!-- This will be displayed if the user doesn't have JavaScript enabled. -->
This will be displayed if the user doesn't have JavaScript enabled. LLDAP requires JavaScript, please switch to a compatible browser or
--> enable it.
LLDAP requires JavaScript, please switch to a compatible browser or enable </noscript>
it.
</noscript>
<script> <script>
/* Detect if the user has WASM support. */ /* Detect if the user has WASM support. */
if (typeof WebAssembly === 'undefined') { if (typeof WebAssembly === 'undefined') {
const pWASMMsg = document.createElement("p") const pWASMMsg = document.createElement("p")
pWASMMsg.innerHTML = ` pWASMMsg.innerHTML = `
LLDAP requires WASM and JIT for JavaScript, please switch to a LLDAP requires WASM and JIT for JavaScript, please switch to a
compatible browser or enable it. compatible browser or enable it.
` `
document.body.appendChild(pWASMMsg) document.body.appendChild(pWASMMsg)
} }
</script> </script>
</body> </body>
</html> </html>

View File

@ -13,8 +13,8 @@
<script <script
src="/static/bootstrap.bundle.min.js" src="/static/bootstrap.bundle.min.js"
integrity="sha384-/bQdsTh/da6pkI1MST/rWKFNjaCP5gBSY4sEBT38Q/9RBh9AH40zEOg7Hlq2THRZ"></script> integrity="sha384-/bQdsTh/da6pkI1MST/rWKFNjaCP5gBSY4sEBT38Q/9RBh9AH40zEOg7Hlq2THRZ"></script>
<script <script
src="/static/darkmode.min.js" src="/static/darkmode.min.js"
integrity="sha384-A4SLs39X/aUfwRclRaXvNeXNBTLZdnZdHhhteqbYFS2jZTRD79tKeFeBn7SGXNpi"></script> integrity="sha384-A4SLs39X/aUfwRclRaXvNeXNBTLZdnZdHhhteqbYFS2jZTRD79tKeFeBn7SGXNpi"></script>
<link <link
rel="stylesheet" rel="stylesheet"
@ -40,6 +40,23 @@
</head> </head>
<body> <body>
<noscript>
<!-- This will be displayed if the user doesn't have JavaScript enabled. -->
LLDAP requires JavaScript, please switch to a compatible browser or
enable it.
</noscript>
<script>
/* Detect if the user has WASM support. */
if (typeof WebAssembly === 'undefined') {
const pWASMMsg = document.createElement("p")
pWASMMsg.innerHTML = `
LLDAP requires WASM and JIT for JavaScript, please switch to a
compatible browser or enable it.
`
document.body.appendChild(pWASMMsg)
}
</script>
</body> </body>
</html> </html>