remember open status

This commit is contained in:
dcore94 2023-03-17 09:46:42 +01:00
parent 69a1b7efea
commit 8a5f21bb0b
1 changed files with 15 additions and 0 deletions

View File

@ -299,6 +299,21 @@ class CCPMethodList2 extends HTMLElement{
e.querySelector("span[name=count_executables]").textContent = executables
}
},
{
target : "details",
apply : (e,d)=>{
e.alt = e.title = d
if(sessionStorage.getItem(d) === "open") e.open = "open";
else e.removeAttribute("open");
},
on_toggle : ev=>{
if(ev.target.open){
sessionStorage.setItem(ev.currentTarget.alt, 'open')
}else{
sessionStorage.removeItem(ev.currentTarget.alt)
}
}
},
{
target : "details ul[name=process_list]",
in : (e,d)=>d,