Skip to content

Commit 4d6a93b

Browse files
authored
Add files via upload
1 parent 3cd2c5b commit 4d6a93b

2 files changed

Lines changed: 31 additions & 29 deletions

File tree

docs/assets/app.js

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11

2-
function searchLinks() {
3-
const q = document.getElementById('searchBox');
4-
if (!q) return;
5-
q.addEventListener('input', function(){
6-
const term = this.value.toLowerCase();
7-
document.querySelectorAll('[data-search]').forEach(el=>{
8-
el.style.display = el.getAttribute('data-search').toLowerCase().includes(term) ? '' : 'none';
2+
document.addEventListener('DOMContentLoaded', function(){
3+
const box=document.getElementById('searchBox');
4+
if(box){
5+
box.addEventListener('input', function(){
6+
const q=this.value.toLowerCase();
7+
document.querySelectorAll('[data-search]').forEach(el=>{
8+
const s=(el.getAttribute('data-search')||'').toLowerCase();
9+
el.style.display=s.includes(q)?'':'none';
10+
});
911
});
10-
});
11-
}
12-
document.addEventListener('DOMContentLoaded', searchLinks);
12+
}
13+
});

docs/assets/style.css

Lines changed: 20 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)