View file htmly-2.9.8/themes/doks/js/main.js

File size: 351B
(function () {

    document.getElementById("mode").addEventListener("click", () => {
        document.body.classList.toggle("dark");
        localStorage.setItem("theme", document.body.classList.contains("dark") ? "dark" : "light");
    });
    if (localStorage.getItem("theme") === "dark") {
        document.body.classList.add("dark");
    }

})();