/* initialize onclick here because the main point is to avoid inline scripts and stylesheets */ document.getElementById("dark-mode-button").addEventListener("click", darkmode);