Files
vrisingd/html/index.html
2022-05-24 15:07:31 -05:00

32 lines
792 B
HTML

<!DOCTYPE html>
<header>
<title>Rod</title>
</header>
<body>
<p id="console"> Why Hello There</p>
<button id="update" type="button">Update</button>
<form method="get" action="backup.zip">
<button type="submit">Download!</button>
</form>
</body>
<script>
let update_button = document.getElementById("update")
let start_button = document.getElementById("start")
let console = document.getElementById("console")
update_button.addEventListener("click", update)
async function update() {
update_button.disabled = true
console.innerText = "Updating"
let resp = await fetch("/api/update")
let body = await resp.text()
console.innerText = body
update_button.disabled = false
}
</script>
</html>