diff --git a/pwnagotchi/plugins/default/logtail.py b/pwnagotchi/plugins/default/logtail.py
index 086bf73..3f633e1 100644
--- a/pwnagotchi/plugins/default/logtail.py
+++ b/pwnagotchi/plugins/default/logtail.py
@@ -91,7 +91,7 @@ TEMPLATE = """
{% endblock %}
{% block script %}
- var content = document.getElementById('content');
+ var table = document.getElementById('table');
var filter = document.getElementById('filter');
var filterVal = filter.value.toUpperCase();
@@ -155,10 +155,10 @@ TEMPLATE = """
tr.className = colorClass;
if (filterVal.length > 0 && value.toUpperCase().indexOf(filterVal) == -1) {
- tr.style.visibility = "collapse";
+ tr.style.display = "none";
}
- content.appendChild(tr);
+ table.appendChild(tr);
});
position = messages.length - 1;
}
@@ -194,25 +194,15 @@ TEMPLATE = """
function doneTyping() {
document.body.style.cursor = 'progress';
- var table, tr, tds, td, i, txtValue;
+ var tr, tds, td, i, txtValue;
filterVal = filter.value.toUpperCase();
- table = document.getElementById("content");
tr = table.getElementsByTagName("tr");
- for (i = 0; i < tr.length; i++) {
- tds = tr[i].getElementsByTagName("td");
- if (tds) {
- for (l = 0; l < tds.length; l++) {
- td = tds[l];
- if (td) {
- txtValue = td.textContent || td.innerText;
- if (txtValue.toUpperCase().indexOf(filterVal) > -1) {
- tr[i].style.visibility = "visible";
- break;
- } else {
- tr[i].style.visibility = "collapse";
- }
- }
- }
+ for (i = 1; i < tr.length; i++) {
+ txtValue = tr[i].textContent || tr[i].innerText;
+ if (txtValue.toUpperCase().indexOf(filterVal) > -1) {
+ tr[i].style.display = "table-row";
+ } else {
+ tr[i].style.display = "none";
}
}
document.body.style.cursor = 'default';
@@ -226,7 +216,7 @@ TEMPLATE = """
-
Time |
---|