diff --git a/Resources/landing-page/js/scripts.js b/Resources/landing-page/js/scripts.js index 08da6aab..49c4ca45 100644 --- a/Resources/landing-page/js/scripts.js +++ b/Resources/landing-page/js/scripts.js @@ -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); }