Initial commit

This commit is contained in:
root
2023-04-27 14:46:18 +00:00
commit bbca1a86d1
35 changed files with 2418 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
import RoverApi from "./roverApi.js";
const api = new RoverApi();
const aside = document.getElementsByTagName("aside")[0];
const amount = document.createElement("h2");
createStatus();
setInterval(checkNewStatus, 3 * 1000);
function checkNewStatus() {
api.getRouteAmount(data => {
amount.innerHTML = data.amount;
});
}
function createStatus() {
api.getRouteAmount((data) => {
const title = document.createElement("h2");
title.innerHTML = "Anzahl <br> aller <br> Routen";
amount.innerHTML = data.amount;
aside.append(title);
aside.append(amount);
});
}