diff options
author | Mango0x45 <thomasvoss@live.com> | 2021-04-30 23:45:01 +0200 |
---|---|---|
committer | Mango0x45 <thomasvoss@live.com> | 2021-04-30 23:45:01 +0200 |
commit | a1cef7b085631baeb38a1bf9f19a5a17ae6d5789 (patch) | |
tree | b1cd8e30984620c1d44ac16eb7761fd7e0b639a7 | |
parent | 571ef6214da83ab544adedba8189c2a93bfd15c7 (diff) |
Fix retarded bug
-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"); +} |