From 02645b7ef7acd1b39d4f2ca4ffc98b0bee0cccbe Mon Sep 17 00:00:00 2001 From: mco-system Date: Sat, 27 May 2023 17:45:07 +1100 Subject: [PATCH] feat: status page + maintenance --- maintenance/scripts/maintenance.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/maintenance/scripts/maintenance.js b/maintenance/scripts/maintenance.js index 4b316e3..e819188 100644 --- a/maintenance/scripts/maintenance.js +++ b/maintenance/scripts/maintenance.js @@ -1,13 +1,18 @@ function reboot() { + console.log("Vroom..."); var xhttp = new XMLHttpRequest(); + console.log("Vroop..."); xhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { - console.log("Ready..."); + console.log("Houba"); document.getElementById("logs").innerHTML = this.responseText; console.log("Hop"); setTimeout(function () {location.reload()}, 5000); } }; + console.log("Ready"); xhttp.open("GET", "https://www.thsf.net/thsf.net/maintenance/reboot.py", true); + console.log("Go"); xhttp.send(); + console.log("Gone !"); }