From a1cef7b085631baeb38a1bf9f19a5a17ae6d5789 Mon Sep 17 00:00:00 2001 From: Mango0x45 Date: Fri, 30 Apr 2021 23:45:01 +0200 Subject: Fix retarded bug --- main.js | 11 +++++++++-- 1 file 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"); +} -- cgit v1.2.3