]> git.mdlowis.com Git - projs/mdl.git/commitdiff
inline titleMatch. it looks like children cannot be un-hidden.
author80B <wtf@idk.lol>
Thu, 7 Jan 2021 22:20:31 +0000 (22:20 +0000)
committer80B <wtf@idk.lol>
Thu, 7 Jan 2021 22:20:31 +0000 (22:20 +0000)
index.html

index 30cdd183f16c2476da15bbf465adc8e45d46450f..e9d713d1db013030e4ba9de7f37d0f14cd4c7174 100644 (file)
@@ -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";
             }
         }
     };