Make darkmode the default

This commit is contained in:
Patrick Schwarzer 2025-05-10 01:45:49 +02:00
parent 65dd6eec72
commit 87f6f6a461
2 changed files with 5 additions and 5 deletions

View file

@ -14,9 +14,9 @@ document.addEventListener("DOMContentLoaded", () => {
// Load Dark Mode preference from cache
const theme = localStorage.getItem("theme");
if (theme === "dark"){
body.classList.remove("light-mode");
darkModeButton.textContent = "🌙";
if (theme === "light"){
body.classList.add("light-mode");
darkModeButton.textContent = "☀️";
}
darkModeButton.addEventListener("click", () => {