From: 80B Date: Thu, 7 Jan 2021 22:24:59 +0000 (+0000) Subject: set style.display for all children, so they can be un-hidden X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=837f5cf38dd1519249b2439397430b8bc1b06dd8;p=projs%2Fmdl.git set style.display for all children, so they can be un-hidden --- diff --git a/index.html b/index.html index e9d713d..b31b9c0 100644 --- a/index.html +++ b/index.html @@ -33,12 +33,9 @@ const loadPage = file => { const filterPages = (allitems) => { const value = search.value.toLowerCase(); - [...pages.children].forEach(child => { - if (child.style.display !== "none" || allitems) { - child.style.display = - child.innerText.toLowerCase().includes(value) ? "list-item" : "none"; - } - } + [...pages.children].forEach(child => ( child.style.display = + allitems || child.innerText.toLowerCase().includes(value) ? 'list-item' + : 'none' )); }; const keys = {