global: snapshot

This commit is contained in:
nym21
2026-04-01 17:51:50 +02:00
parent 96f2e058f7
commit 7172ddb247
17 changed files with 731 additions and 652 deletions

View File

@@ -4,7 +4,9 @@ const preferredColorSchemeMatchMedia = window.matchMedia(
"(prefers-color-scheme: dark)",
);
const stored = readStored("theme");
const initial = stored ? stored === "dark" : preferredColorSchemeMatchMedia.matches;
const initial = stored
? stored === "dark"
: preferredColorSchemeMatchMedia.matches;
export let dark = initial;
@@ -47,4 +49,4 @@ function invert() {
}
}
document.getElementById("invert-button")?.addEventListener("click", invert);
document.getElementById("theme-button")?.addEventListener("click", invert);