MediaWiki:Common.js: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 550: Line 550:
}
}
});
});


function toggleDarkMode() {
function toggleDarkMode() {
const darkMode = getItem("darkMode");
const darkMode = localStorage.getItem("darkMode");
if (darkMode !== true) {
if (darkMode !== true) {
    localStorage.setItem("darkMode", true);
    localStorage.setItem("darkMode", true);