5,798
edits
No edit summary |
No edit summary |
||
Line 550: | Line 550: | ||
} | } | ||
}); | }); | ||
function toggleDarkMode() { | function toggleDarkMode() { | ||
const darkMode = getItem("darkMode"); | const darkMode = getItem("darkMode"); | ||
if (darkMode !== true) { | if (darkMode !== true) { | ||
localStorage.setItem("darkMode", true); | |||
document.body.classList.add("darkMode"); | document.body.classList.add("darkMode"); | ||
} else { | } else { | ||
localStorage.setItem("darkMode", false); | |||
document.body.classList.remove("darkMode"); | document.body.classList.remove("darkMode"); | ||
} | } | ||
} | } |