summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Gunger <kgunger12@gmail.com>2022-01-10 22:42:04 -0500
committerKyle Gunger <kgunger12@gmail.com>2022-01-10 22:42:04 -0500
commitd1e77540823892892f69b6278200216f686bcf8a (patch)
tree0e106c82fc73a64aa09da9384a8d5b961414cf17
parent695cacf0e5cfb58927436215b97ffb7e2051ff89 (diff)
fix another bug (with the script this time)
-rw-r--r--scripts/theme.js8
1 files changed, 2 insertions, 6 deletions
diff --git a/scripts/theme.js b/scripts/theme.js
index 8147260..0a11297 100644
--- a/scripts/theme.js
+++ b/scripts/theme.js
@@ -12,7 +12,7 @@ const BASE_THEMES = [[
const APP_NAME = "cshift-net";
class Theme{
- static theme = document.getElementById("theme");
+ static theme = document.getElementById("theme-" + APP_NAME);
static UserThemes = [[],[]];
static init()
@@ -28,11 +28,7 @@ class Theme{
if(Cookies.getCookie("theme-" + APP_NAME) == ""){
Cookies.setYearCookie("theme", BASE_THEMES[0][0]);
}
- }
- static restore()
- {
- Theme.init();
Theme.theme.setAttribute("href", Cookies.getCookie("theme-" + APP_NAME) + "?v=" + Date.now());
}
@@ -72,4 +68,4 @@ class Theme{
}
}
-Theme.restore(); \ No newline at end of file
+Theme.init(); \ No newline at end of file