|
|
@ -79,12 +79,13 @@ function injectTheme(theme,container="head") { |
|
|
|
if (container === "head") { |
|
|
|
html_element = document.head; |
|
|
|
} else html_element = document.body; |
|
|
|
let link = document.createElement("link"); |
|
|
|
let themeOption = document.getElementById("theme-option") |
|
|
|
let link = themeOption ? themeOption : document.createElement("link"); |
|
|
|
url = "/CSS/variables/" |
|
|
|
link.type = "text/css"; |
|
|
|
link.rel = "stylesheet"; |
|
|
|
link.href = `${url}/${theme.toLowerCase()}.css`; |
|
|
|
|
|
|
|
link.id = `theme-option` |
|
|
|
html_element.appendChild(link); |
|
|
|
} |
|
|
|
|
|
|
|