Merge API branch into main #12

Merged
SemvdH merged 334 commits from api into main 2023-06-13 19:54:43 +00:00
Showing only changes of commit 084fa9dc77 - Show all commits

View File

@@ -65,7 +65,7 @@
var xhr = new XMLHttpRequest();
xhr.open("GET", "/status", true);
xhr.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
if (this.status == 200) {
var status = JSON.parse(this.responseText);
document.getElementById("batterypercentage").innerHTML = "Battery percentage: " + status.battery_percentage;
document.getElementById("cpuload").innerHTML = "CPU load: " + status.cpu_usage;