User:Антаркт/fandommobile.js

document.body.classList.remove("fandommobile-fandom-theme"); var hrefValue = mw.config.get("wgScriptPath") + "/wikia.php?controller=ThemeApi&method=themeVariables&variant=" + (document.body.classList.contains("theme-fandommobile-dark") ? "dark" : "light"), themeVariables = document.querySelector(".nkch-theme-variables");

if (themeVariables != null) themeVariables.href = hrefValue; else { var theme = document.createElement("link"); theme.classList.add("nkch-theme-variables");

theme.href = hrefValue; theme.setAttribute("rel", "stylesheet");

document.head.append(theme); }