personal-website/assets/js/dark_mode.js

9 lines
245 B
JavaScript

document.addEventListener('DOMContentLoaded', function() {
const mode_toggle = document.getElementById("light-toggle");
mode_toggle.addEventListener("click", function() {
toggleTheme(localStorage.getItem("theme"));
});
});