From: 80B Date: Fri, 8 Jan 2021 02:03:54 +0000 (+0000) Subject: no allitems X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=563c7b86204df7d8012f9944ec1911303747f0ec;p=projs%2Fmdl.git no allitems --- diff --git a/index.html b/index.html index 3111b1d..f61390b 100644 --- a/index.html +++ b/index.html @@ -31,9 +31,9 @@ const loadPage = (file, dir = { J: 'journals', N: 'notes', T: 'tasks' }[file[0]] props ); }; - const filterPages = (allitems, value = search.value.toLowerCase()) => + const filterPages = (value = search.value.toLowerCase()) => [...pages.children].forEach( child => child.css('hidden', - !allitems && !child.innerText.toLowerCase().includes(value) )); + !child.innerText.toLowerCase().includes(value) )); const keys = { "f": () => { @@ -49,7 +49,7 @@ const loadPage = (file, dir = { J: 'journals', N: 'notes', T: 'tasks' }[file[0]] document.onkeyup = ev => !keys[ev.key] || keys[ev.key](ev); search.onkeyup = (ev) => { - filterPages(ev.key === "Backspace"); + filterPages(); ev.stopPropagation(); }