From: 80B Date: Thu, 7 Jan 2021 22:20:31 +0000 (+0000) Subject: inline titleMatch. it looks like children cannot be un-hidden. X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=d85f979ee8cdf9941f3283fa974ec89012b0ece0;p=projs%2Fmdl.git inline titleMatch. it looks like children cannot be un-hidden. --- diff --git a/index.html b/index.html index 30cdd18..e9d713d 100644 --- a/index.html +++ b/index.html @@ -35,8 +35,8 @@ const loadPage = file => { const value = search.value.toLowerCase(); [...pages.children].forEach(child => { if (child.style.display !== "none" || allitems) { - const titleMatch = child.innerText.toLowerCase().includes(value); - child.style.display = ((titleMatch) ? "list-item" : "none"); + child.style.display = + child.innerText.toLowerCase().includes(value) ? "list-item" : "none"; } } };