fix: merge pull request #80 from brian6932/fix/prefers-color-scheme
fix: prefers-color-scheme
This commit is contained in:
commit
9e307b7da4
@ -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);
|
||||
|
||||
const themeChooser = document.getElementById("choose-theme");
|
||||
|
Loading…
x
Reference in New Issue
Block a user