Anonymous

MediaWiki:Common.js: Difference between revisions

From Melvor Idle
no edit summary
No edit summary
No edit summary
Line 554: Line 554:
function toggleDarkMode() {
function toggleDarkMode() {
const darkMode = localStorage.getItem("darkMode");
const darkMode = localStorage.getItem("darkMode");
if (darkMode !== true) {
if (darkMode !== "true") {
    localStorage.setItem("darkMode", true);
    localStorage.setItem("darkMode", true);
document.body.classList.add("darkMode");
document.body.classList.add("darkMode");