Made database queries a thing for filtering. Tweaked gitignore again oof, added a toggle listener for marking hosts on the web page

This commit is contained in:
rain
2023-05-24 23:04:19 -05:00
parent 12ec70ea0c
commit 9f6e22875c
7 changed files with 51 additions and 30 deletions
+7 -18
View File
@@ -1,20 +1,9 @@
function filter_ports(filter) {
let portCol = document.querySelectorAll("tbody tr td:last-child");
portCol.forEach((item) => {
if(!new RegExp(filter).test(item.innerText)){
item.parentNode.style.display = "none";
} else {
item.parentNode.style.display = "table-row";
}
});
}
document.querySelector("#ports").addEventListener("keyup", (event) => {
if (event.key === "Enter") {
filter_ports(event.srcElement.value);
}
});
function count_rows() {
return document.querySelectorAll('tr:not([style*="display:none"]):not([style*="display: none"])').length;
}
}
document.querySelectorAll("tbody tr").forEach(function(elem) {
elem.addEventListener("click", function() {
elem.classList.toggle('active');
});
});