Limit search by function to one function only

This commit is contained in:
Andrea Cardaci 2018-05-29 12:22:33 +02:00
parent 4093161262
commit 0b90fa4c8f

View File

@ -37,9 +37,11 @@
var noResults = true; var noResults = true;
document.querySelectorAll('#bin-table tbody tr').forEach(function (row) { document.querySelectorAll('#bin-table tbody tr').forEach(function (row) {
var binName = row.children[0].firstElementChild.innerText.toLowerCase(); var binName = row.children[0].firstElementChild.innerText.toLowerCase();
var functions = row.children[1].firstElementChild.innerText.toLowerCase(); var functions = Array.from(row.children[1].firstElementChild.children)
var against = (queryType === '/' ? functions : binName); .map(function (x) { return x.innerText })
.join('\n').toLowerCase();
var against = (queryType === '/' ? functions : binName);
if (against.indexOf(query) !== -1) { if (against.indexOf(query) !== -1) {
row.style.display = ''; row.style.display = '';
noResults = false; noResults = false;