mostly good for release

This commit is contained in:
sundae 2025-06-25 13:08:50 +03:00
parent 8fc7eff67b
commit b626e6265e
No known key found for this signature in database
32 changed files with 425 additions and 169 deletions

View file

@ -1,12 +1,13 @@
const detailsElements = document.getElementsByTagName('details');
const dropdown = Array.from(detailsElements);
const save = () => {
Array.from(detailsElements).forEach((details, i) => {
dropdown.forEach((details, i) => {
localStorage.setItem(`details${i}`, details.hasAttribute('open'));
});
};
Array.from(detailsElements).forEach((details, i) => {
dropdown.forEach((details, i) => {
const isOpen = JSON.parse(localStorage.getItem(`details${i}`)) || false;
details.toggleAttribute('open', isOpen);
details.addEventListener('toggle', save);
@ -18,7 +19,7 @@ Array.from(detailsElements).forEach((details, i) => {
});
setTimeout(() => {
Array.from(detailsElements).forEach(details => {
dropdown.forEach(details => {
const svg = details.querySelector('summary svg');
if (svg) svg.style.transition = '';
});