mirror of
https://github.com/rramiachraf/dumb.git
synced 2025-04-01 20:07:36 +03:00
fix: merge pull request #80 from brian6932/fix/prefers-color-scheme
fix: prefers-color-scheme
This commit is contained in:
commit
9e307b7da4
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