mirror of
https://github.com/hexahigh/cdn.git
synced 2025-12-11 20:15:22 +01:00
test
This commit is contained in:
parent
312fc1a48b
commit
781fd0a76b
16
js/ajax.js
16
js/ajax.js
@ -35,9 +35,21 @@ if(resppage = true){
|
||||
}
|
||||
}
|
||||
|
||||
window.onload = async function startdown(){
|
||||
const controller = new AbortController()
|
||||
|
||||
// 5 second timeout:
|
||||
|
||||
const timeoutId = setTimeout(() => controller.abort(), 5000)
|
||||
|
||||
fetch('https://t0m0t0w.github.io/backuprr/history.dat', { 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"})
|
||||
}
|
||||
}
|
||||
}*/
|
||||
@ -11,3 +11,8 @@ window.onload = async function startdown(){
|
||||
await fetch('https://t0m0t0w.github.io/backuprr/history.dat', {cache: "no-store"})
|
||||
}
|
||||
}
|
||||
|
||||
window.onload = function reload(){
|
||||
await delay(60000);
|
||||
location.reload();
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user