1
0
mirror of https://github.com/gilbN/theme.park.git synced 2024-10-02 21:47:12 +02:00
This commit is contained in:
GilbN 2022-04-01 20:04:37 +00:00
parent 5f1067cb5e
commit c376eeac5b

View File

@ -56,7 +56,7 @@ function injectTheme(theme,container="head") {
} else html_element = document.body;
let themeOption = document.getElementById("theme-option")
let link = themeOption ? themeOption : document.createElement("link");
url = "/css/theme-options"
url = `${window.location.pathname}css/theme-options`
link.type = "text/css";
link.rel = "stylesheet";
link.href = `${url}/${themeLower}.css`;
@ -145,7 +145,7 @@ function fadeOutIn(speed) {
}
function updateMetaThemeColor() {
fetch(`/css/theme-options/${Object.keys(themeOptions)[currentIndex].toLowerCase()}.css`)
fetch(`${window.location.pathname}css/theme-options/${Object.keys(themeOptions)[currentIndex].toLowerCase()}.css`)
.then(response => response.text())
.then(text => {
let re = text.match("--accent-color:.*;")[0]