From 7ec52b4cda1b58a29d1fb3cd5a773a6e6ba76f01 Mon Sep 17 00:00:00 2001 From: Jose Stovall Date: Fri, 3 Apr 2020 10:25:35 -0400 Subject: [PATCH] Use relative dirs --- js/theme.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/js/theme.js b/js/theme.js index 892d9b1..c615538 100644 --- a/js/theme.js +++ b/js/theme.js @@ -22,15 +22,15 @@ const toggle = () => { if (mode == "dark") { window.localStorage.setItem("theme", "moonlight"); mode = "moonlight"; - css.href = "/css/themes/moonlight.css"; + css.href = "../css/themes/moonlight.css"; } else if (mode == "moonlight") { window.localStorage.setItem("theme", "light"); mode = "light"; - css.href = "/css/themes/light.css"; + css.href = "../css/themes/light.css"; } else { window.localStorage.setItem("theme", "dark"); mode = "dark"; - css.href = "/css/themes/dark.css"; + css.href = "../css/themes/dark.css"; } updateIcon(); }; @@ -54,12 +54,11 @@ window.addEventListener("DOMContentLoaded", (evt) => { mode = window.localStorage.getItem("theme"); if (mode == "dark") { - css.href = "/css/themes/dark.css"; + css.href = "../css/themes/dark.css"; } else if (mode == "moonlight") { - css.href = "/css/themes/moonlight.css"; + css.href = "../css/themes/moonlight.css"; } else { - css.href = "/css/themes/light.css"; + css.href = "../css/themes/light.css"; } - updateIcon(); }); \ No newline at end of file