blob: 04d88ab5b1f5f839794fc66b4b93ddf7367ea6d2 (
plain)
1
2
3
4
5
6
7
|
let query = new URLSearchParams(window.location.search).get("query");
document.getElementById("searchTitle").innerHTML += '"' + query + '":';
document.getElementById("searchTable").innerHTML = pages
.filter(el => el.name.toLowerCase().startsWith(query.toLowerCase()))
.reduce((acc, element) => {
return acc + '<tr><td><a href="' + element.location + '">' + element.name + '</a></td></tr>'
}, "");
|