V2: Added Webserver for faster formatting
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
(() => {
|
||||
const allowedThemes = new Set(["system", "light", "dark"]);
|
||||
let theme = "system";
|
||||
|
||||
try {
|
||||
const savedTheme = window.localStorage.getItem("roster-theme");
|
||||
if (allowedThemes.has(savedTheme)) {
|
||||
theme = savedTheme;
|
||||
}
|
||||
} catch {
|
||||
// Storage can be unavailable in hardened or private browsing contexts.
|
||||
}
|
||||
|
||||
document.documentElement.dataset.theme = theme;
|
||||
})();
|
||||
Reference in New Issue
Block a user