yay website

This commit is contained in:
sundae 2025-06-11 09:36:54 +03:00
parent 623e26a808
commit 4d44fd94a2
No known key found for this signature in database
585 changed files with 5066 additions and 0 deletions

View file

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