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
+1 -1
View File
@@ -146,7 +146,7 @@
</label>
<button id="share-button" title="Share">Share</button>
<button id="invert-button" title="Invert">Invert</button>
<button id="theme-button" title="Invert theme">Theme</button>
</fieldset>
</footer>
</main>
+4 -2
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);