aboutsummaryrefslogtreecommitdiff
path: root/static/js/themes.js
diff options
context:
space:
mode:
authorKushBlazingJudah <59340248+KushBlazingJudah@users.noreply.github.com>2021-08-18 00:26:02 -0300
committerKushBlazingJudah <59340248+KushBlazingJudah@users.noreply.github.com>2021-08-18 00:26:02 -0300
commit9e782ba01620997becc3118433e3d1961a88b2c3 (patch)
tree14219adaa719d6c6fb913dd9a2cf73ba3a09df71 /static/js/themes.js
parent17e54854794dacac8409cd10ffb77005d74b8dbe (diff)
rudimentary theme switching
Diffstat (limited to 'static/js/themes.js')
-rw-r--r--static/js/themes.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/static/js/themes.js b/static/js/themes.js
index 0d9772f..19bdbb4 100644
--- a/static/js/themes.js
+++ b/static/js/themes.js
@@ -20,5 +20,11 @@ function setTheme(name) {
}
function applyTheme() {
+ // HACK: disable all of the themes first. this for some reason makes things work.
+ for (let i = 0, tags = document.getElementsByTagName("link"); i < tags.length; i++) {
+ if (tags[i].type === "text/css" && tags[i].title) {
+ tags[i].disabled = true;
+ }
+ }
setTheme(getCookie("theme") || "default");
}