From d1e77540823892892f69b6278200216f686bcf8a Mon Sep 17 00:00:00 2001 From: Kyle Gunger Date: Mon, 10 Jan 2022 22:42:04 -0500 Subject: fix another bug (with the script this time) --- scripts/theme.js | 8 ++------ 1 file 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 -- cgit v1.2.3