unfinished bullCRAP

This commit is contained in:
sundae 2026-04-02 19:45:57 +03:00
commit cb5ba4fb82
Signed by: sundae
SSH key fingerprint: SHA256:MsJkKuo4PUdjQDpLeaURy81drKkW14exlTHp+8QFu6M
23 changed files with 351 additions and 347 deletions

View file

@ -1,14 +0,0 @@
const detailsElements = document.getElementsByTagName("details");
const dropdown = Array.from(detailsElements);
const save = () => {
dropdown.forEach((details, i) => {
localStorage.setItem(`details${i}`, details.hasAttribute("open"));
});
};
dropdown.forEach((details, i) => {
const isOpen = JSON.parse(localStorage.getItem(`details${i}`)) || false;
details.toggleAttribute("open", isOpen);
details.addEventListener("toggle", save);
});