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:
@@ -41,6 +41,9 @@ tbody tr:hover td {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
tbody tr.active td {
|
||||
background-color: #FFEFC6;
|
||||
}
|
||||
|
||||
table tr:last-child td:first-child {
|
||||
border-bottom-left-radius: 10px;
|
||||
|
||||
+7
-18
@@ -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');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user