a funny gag

This commit is contained in:
りき萌 2023-08-22 22:32:40 +02:00
parent 1225f6d313
commit 7ed058a9db
6 changed files with 22 additions and 8 deletions

View file

@ -17,8 +17,9 @@ class Branch extends HTMLLIElement {
this.details = this.childNodes[0];
this.innerUL = this.details.childNodes[1];
let doPersist = !this.hasAttribute("data-th-do-not-persist");
let isOpen = branchIsOpen(this.id);
if (isOpen !== undefined) {
if (doPersist && isOpen !== undefined) {
this.details.open = isOpen;
}
this.details.addEventListener("toggle", _ => {