From 11174cc75654183e1d7cc7b3511025f4b0205dca Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Wed, 10 Sep 2025 21:59:56 -0400 Subject: [PATCH] index.html.in: use classList for the night/day toggle This is a little bit more robust than simply declaring that the sky element will never have any other classes. --- index.html.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.html.in b/index.html.in index 244f742..e2b4b2a 100644 --- a/index.html.in +++ b/index.html.in @@ -771,11 +771,11 @@ function swap_day_night() { const sky = document.getElementById("sky"); - if (sky.getAttribute("class") == "night") { - sky.setAttribute("class", ""); + if (sky.classList.contains("night")) { + sky.classList.remove("night"); } else { - sky.setAttribute("class", "night"); + sky.classList.add("night"); } } -- 2.49.0