localstorage theme

This commit is contained in:
Janis
2022-10-31 18:30:22 +01:00
parent 2ff402a320
commit 1c80395b5a

View File

@@ -3,6 +3,7 @@ let ws;
let channelId; let channelId;
function changeColorTheme(theme) { function changeColorTheme(theme) {
localStorage.setItem("theme", JSON.stringify(theme));
rootElem.style.setProperty("--border-color-1", theme[0]); rootElem.style.setProperty("--border-color-1", theme[0]);
rootElem.style.setProperty("--border-color-2", theme[1]); rootElem.style.setProperty("--border-color-2", theme[1]);
} }
@@ -104,4 +105,4 @@ function pubSubMain() {
} }
pubSubMain(); pubSubMain();
// changeColorTheme(CONFIG.themes.purple); changeColorTheme(JSON.parse(localStorage.getItem("theme")));