Files
mifi-links/static/assets/js/bootstrap.js
mifi 9db2592cf4
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/push/deploy Pipeline was successful
Robots, Trusted Types, and various other bits...
2026-02-06 21:07:57 -03:00

13 lines
622 B
JavaScript

(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');
})();