From 8fb38d8fc7f882fc11bf77e64d981cb0a960d2e3 Mon Sep 17 00:00:00 2001 From: 80B Date: Thu, 7 Jan 2021 22:27:01 +0000 Subject: [PATCH] just like, my opinion, man. --- index.html | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/index.html b/index.html index b31b9c0..f5cf995 100644 --- a/index.html +++ b/index.html @@ -31,12 +31,10 @@ const loadPage = file => { return Object.assign(el, props); }; - const filterPages = (allitems) => { - const value = search.value.toLowerCase(); + const filterPages = (allitems, value = search.value.toLowerCase()) => [...pages.children].forEach(child => ( child.style.display = allitems || child.innerText.toLowerCase().includes(value) ? 'list-item' : 'none' )); - }; const keys = { "f": () => { -- 2.52.0