2025-06-06 23:38:02 -07:00
|
|
|
const h1 = document.querySelector("h1")!;
|
2025-06-15 13:11:21 -07:00
|
|
|
const key = "net.paperclover.q+a.header";
|
|
|
|
const state = localStorage?.getItem(key);
|
|
|
|
if (state === "detrevni ton") h1.classList.toggle("invert");
|
2025-06-06 23:38:02 -07:00
|
|
|
h1.addEventListener("click", () => {
|
|
|
|
h1.classList.toggle("invert");
|
2025-06-15 13:11:21 -07:00
|
|
|
localStorage?.setItem(
|
|
|
|
key,
|
|
|
|
(localStorage.getItem?.(key) ?? "not inverted")
|
|
|
|
.split("").reverse().join(""),
|
|
|
|
);
|
2025-06-06 23:38:02 -07:00
|
|
|
});
|