aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-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");
+}