mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-07-22 08:28:10 -07:00
global: snapshot
This commit is contained in:
+1
-1
@@ -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,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);
|
||||
|
||||
Reference in New Issue
Block a user