Robots, Trusted Types, and various other bits...
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/push/deploy Pipeline was successful

This commit is contained in:
2026-02-06 21:07:57 -03:00
parent a52938f6cf
commit 9db2592cf4
13 changed files with 65 additions and 12 deletions

12
static/assets/js/bootstrap.js vendored Normal file
View File

@@ -0,0 +1,12 @@
(function () {
// Default Trusted Type policy so Svelte hydration can assign to innerHTML under CSP require-trusted-types-for 'script'.
if (typeof window.trustedTypes !== 'undefined' && window.trustedTypes.createPolicy) {
try {
window.trustedTypes.createPolicy('default', { createHTML: function (input) { return input; } });
} catch { /* policy already exists */ }
}
var t = localStorage.getItem('mifi-theme');
if (t === 'light' || t === 'dark') document.documentElement.setAttribute('data-theme', t);
else document.documentElement.removeAttribute('data-theme');
})();