aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMango0x45 <thomasvoss@live.com> 2021-04-30 23:45:01 +0200
committerMango0x45 <thomasvoss@live.com> 2021-04-30 23:45:01 +0200
commita1cef7b085631baeb38a1bf9f19a5a17ae6d5789 (patch)
treeb1cd8e30984620c1d44ac16eb7761fd7e0b639a7
parent571ef6214da83ab544adedba8189c2a93bfd15c7 (diff)
Fix retarded bug
-rw-r--r--main.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/main.js b/main.js
index 8f04723..73db06e 100644
--- a/main.js
+++ b/main.js
@@ -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");
+}