You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
447 B
JavaScript

(function () {
var last_timestamp;
async function poll () {
var rows = await (await fetch("/cgi-bin/radioimplicancies.cgi")).json();
console.log("rows", rows);
if (rows) {
// get the last (most recent) item
var d = rows[rows.length-1];
if (d.time && d.time != last_timestamp) {
console.log("CURRENT METADATA", d);
last_timestamp = d.time;
}
}
}
window.setInterval(poll, 5000);
})();