diff options
author | Mango0x45 <thomasvoss@live.com> | 2021-05-14 13:39:56 +0200 |
---|---|---|
committer | Mango0x45 <thomasvoss@live.com> | 2021-05-14 13:39:56 +0200 |
commit | 9a545eb6633b293822771f6ae5c6530780513142 (patch) | |
tree | f674ca55ea8499950455fc5c981347846acd73e1 /main.js | |
parent | 3ae7d94e4b851b41c89f0e08932d62352e06bedc (diff) |
Add a settings page and make Jerrin happy
Diffstat (limited to 'main.js')
-rw-r--r-- | main.js | 17 |
1 files changed, 0 insertions, 17 deletions
@@ -100,20 +100,3 @@ function parse_time(event) if (document.getElementById("startobj").value && document.getElementById("endobj").value) compute(); } - -/* Change the users preferred theme. */ -function change_theme() -{ - const theme_switch = document.getElementById("page_theme"); - const want = theme_switch.checked ? "dark" : "light"; - - document.documentElement.setAttribute("theme", want); - localStorage.setItem("theme", want); -} - -/* Automatically select the users preferred theme */ -const theme = localStorage.getItem("theme"); -if (theme) { - document.documentElement.setAttribute("theme", theme); - document.getElementById("page_theme").checked = (theme == "dark"); -} |