From d85f979ee8cdf9941f3283fa974ec89012b0ece0 Mon Sep 17 00:00:00 2001 From: 80B Date: Thu, 7 Jan 2021 22:20:31 +0000 Subject: [PATCH] inline titleMatch. it looks like children cannot be un-hidden. --- index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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"; } } }; -- 2.52.0