MediaWiki:Common.js: Difference between revisions
AllEyezOnMe (talk | contribs) No edit summary Tag: Reverted |
AllEyezOnMe (talk | contribs) No edit summary Tag: Manual revert |
||
| Line 1: | Line 1: | ||
/* Any JavaScript here will be loaded for all users on every page load. */ | /* Any JavaScript here will be loaded for all users on every page load. */ | ||
if (document.querySelector(".force-vector-night")) { | if (document.querySelector(".force-vector-night")) { | ||
const | const url = new URL(window.location.href); | ||
url.searchParams.set("vectornightmode", "1"); | |||
if (window.location.href !== url.toString()) { | |||
window.location.replace(url.toString()); | |||
} | } | ||
} | } | ||