From 4a1cdd123636c52464436b5b58d4b5240b3a1cfb Mon Sep 17 00:00:00 2001 From: Kristofers Solo Date: Sat, 21 Jan 2023 20:10:45 +0200 Subject: [PATCH] Forgot to save --- static/main/js/lightmode.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/static/main/js/lightmode.js b/static/main/js/lightmode.js index 09fddc8..5727901 100644 --- a/static/main/js/lightmode.js +++ b/static/main/js/lightmode.js @@ -27,13 +27,13 @@ $(document).ready(function () { } }) - // if (window.matchMedia) { - // if (window.matchMedia("(prefers-color-scheme: dark)").matches) { - // disable_light_mode() - // } else { - // enable_light_mode() - // } - // } + if (window.matchMedia) { + if (window.matchMedia("(prefers-color-scheme: dark)").matches) { + disable_light_mode() + } else { + enable_light_mode() + } + } $("#color-mode-toggle").click(() => { lightmode = localStorage.getItem("lightmode")