In JS/Browser Filtering on own call

This commit is contained in:
2025-04-11 12:45:11 +00:00
parent 4aae8d743c
commit b2981fd54f

View File

@@ -47,6 +47,9 @@
</table>
<script type="text/javascript">
(function() {
const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString);
const filter = urlParams.get('call') || '';
const tableBody = document.getElementById('messagesTable').querySelector('tbody');
var lines = 0;
var buffer = $('#mqtt');
@@ -55,9 +58,7 @@
console.log('Connected to:', socket.host);
});
socket.on('mqtt', function(message) {
try {
showit=JSON.stringify(message);
} catch {};
if ((filter == '') || (filter == message.station_call)) {
const row = document.createElement('tr');
const timestampCell = document.createElement('td');
const CellCall = document.createElement('td');
@@ -96,16 +97,9 @@
setTimeout(() => {
row.classList.remove('new-row');
}, 1500);
}
});
/*
$( "#i_topic" ).change(function() {
socket.emit("wishtopic",this.value);
$('#mqtt').empty();
});
*/
})();
function tsclean(timestamp) {
const parts = timestamp.split(':');