mirror of
https://github.com/gilbN/theme.park.git
synced 2024-11-20 18:12:31 +01:00
fix: 🐛 fixes 404 errors when using urlbase
This commit is contained in:
parent
c2aa65f91f
commit
5c3b9092bf
@ -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]
|
||||
|
Loading…
Reference in New Issue
Block a user