mirror of
https://github.com/TangentFoxy/lovebird.git
synced 2026-02-11 14:16:51 -07:00
Added status text updating to page
This commit is contained in:
+3
-1
@@ -128,10 +128,12 @@ local pagetemplate = [[
|
|||||||
div.innerHTML = req.responseText;
|
div.innerHTML = req.responseText;
|
||||||
scrolloutput();
|
scrolloutput();
|
||||||
}
|
}
|
||||||
|
var status = req.status == 200 ? "connected" : "disconnected";
|
||||||
|
var div = document.getElementById("status");
|
||||||
|
if (div.innerHTML != status) div.innerHTML = status;
|
||||||
}
|
}
|
||||||
req.open("GET", "/buffer", true);
|
req.open("GET", "/buffer", true);
|
||||||
req.send();
|
req.send();
|
||||||
console.log(req);
|
|
||||||
}
|
}
|
||||||
setInterval(refresh, <?lua echo(lovebird.refreshrate) ?> * 1000);
|
setInterval(refresh, <?lua echo(lovebird.refreshrate) ?> * 1000);
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user