mirror of
https://github.com/rramiachraf/dumb.git
synced 2025-04-01 20:07:36 +03:00
fix: prefers-color-scheme
This commit is contained in:
parent
c1ff537d35
commit
2de4b7aeaf
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue