fix: prefers-color-scheme
This commit is contained in:
parent
c1ff537d35
commit
2de4b7aeaf
@ -76,7 +76,7 @@ function getAnnotation(e) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
window._currentTheme = localStorage.getItem("_theme") || "light";
|
window._currentTheme = localStorage.getItem("_theme") || (window.matchMedia("(prefers-color-scheme:dark)").matches ? "dark" : "light");
|
||||||
setTheme(window._currentTheme);
|
setTheme(window._currentTheme);
|
||||||
|
|
||||||
const themeChooser = document.getElementById("choose-theme");
|
const themeChooser = document.getElementById("choose-theme");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user