diff options
-rw-r--r-- | main.js | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -113,5 +113,12 @@ function change_theme() /* Automatically select the users preferred theme */ const theme = localStorage.getItem("theme"); -document.documentElement.setAttribute("theme", theme); -document.getElementById("page_theme").checked = (theme == "dark"); + +/* I hate this it makes me want to die fuck you firefox */ +if (!theme) { + document.documentElement.setAttribute("theme", light); +} +else { + document.documentElement.setAttribute("theme", theme); + document.getElementById("page_theme").checked = (theme == "dark"); +} |