Fix real Biome bugs: inner declarations, dup keys, assign-in-expr, implicit any, cookie, a11y svg/keyboard, json
Local Build and Deploy / deploy (push) Successful in 51s
Local Build and Deploy / deploy (push) Successful in 51s
This commit is contained in:
1 parent
8d5c8ec96f
commit
59b63d6e70
19 files changed
+76
-44
No files matched your search
@@ -1,14 +1,22 @@
|
||||
(() => {
|
||||
let theme: string | null = null;
|
||||
let defaultDark = false;
|
||||
let navbarColor: string | null = null;
|
||||
let navbarTextColor: string | null = null;
|
||||
try {
|
||||
var s = localStorage.getItem("theme");
|
||||
var dd = document.querySelector('meta[name="theme-default-dark"]');
|
||||
var defaultDark = dd ? dd.getAttribute("content") === "true" : false;
|
||||
if (s === "dark" || (!s && defaultDark))
|
||||
document.documentElement.classList.add("dark");
|
||||
var nc = localStorage.getItem("navbarColor"),
|
||||
nt = localStorage.getItem("navbarTextColor");
|
||||
if (nc) document.documentElement.style.setProperty("--color-navbar", nc);
|
||||
if (nt)
|
||||
document.documentElement.style.setProperty("--color-navbar-text", nt);
|
||||
theme = localStorage.getItem("theme");
|
||||
const dd = document.querySelector('meta[name="theme-default-dark"]');
|
||||
defaultDark = dd ? dd.getAttribute("content") === "true" : false;
|
||||
navbarColor = localStorage.getItem("navbarColor");
|
||||
navbarTextColor = localStorage.getItem("navbarTextColor");
|
||||
} catch (_e) {}
|
||||
if (theme === "dark" || (!theme && defaultDark))
|
||||
document.documentElement.classList.add("dark");
|
||||
if (navbarColor)
|
||||
document.documentElement.style.setProperty("--color-navbar", navbarColor);
|
||||
if (navbarTextColor)
|
||||
document.documentElement.style.setProperty(
|
||||
"--color-navbar-text",
|
||||
navbarTextColor,
|
||||
);
|
||||
})();
|
||||
Reference in new issue
Block a user