diff --git a/static/script.js b/static/script.js index ab854d0..f33106f 100644 --- a/static/script.js +++ b/static/script.js @@ -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");