From d460fa6316d3db4e68e6b4d4c7ee2d02d6505304 Mon Sep 17 00:00:00 2001 From: KushBlazingJudah <59340248+KushBlazingJudah@users.noreply.github.com> Date: Wed, 18 Aug 2021 00:50:13 -0300 Subject: it works --- static/js/themes.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'static/js/themes.js') diff --git a/static/js/themes.js b/static/js/themes.js index 19bdbb4..3f1b906 100644 --- a/static/js/themes.js +++ b/static/js/themes.js @@ -26,5 +26,15 @@ function applyTheme() { tags[i].disabled = true; } } - setTheme(getCookie("theme") || "default"); + let theme = getCookie("theme") || "default"; + setTheme(theme); + + // reflect this in the switcher + let switcher = document.getElementById("themeSwitcher"); + for(var i = 0; i < switcher.options.length; i++) { + if (switcher.options[i].value === theme) { + switcher.selectedIndex = i; + break; + } + } } -- cgit v1.2.3