From 8a5f21bb0b068ce38a05498d3148d2b1527e6587 Mon Sep 17 00:00:00 2001 From: dcore94 Date: Fri, 17 Mar 2023 09:46:42 +0100 Subject: [PATCH] remember open status --- ccp/js/methodlistcontroller2.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/ccp/js/methodlistcontroller2.js b/ccp/js/methodlistcontroller2.js index 1a619eb..ac5dea5 100644 --- a/ccp/js/methodlistcontroller2.js +++ b/ccp/js/methodlistcontroller2.js @@ -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,