|
|
|
@ -1,9 +1,16 @@
|
|
|
|
|
(function () {
|
|
|
|
|
|
|
|
|
|
var last_timestamp;
|
|
|
|
|
|
|
|
|
|
async function poll () {
|
|
|
|
|
var d = await (await fetch("/cgi-bin/radioimplicancies.cgi")).json();
|
|
|
|
|
console.log("d", d);
|
|
|
|
|
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);
|
|
|
|
|