feat(index.html): implement auto-reload functionality every 5 seconds
This commit is contained in:
@@ -143,6 +143,9 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Auto-reload every 5 seconds
|
||||||
|
setInterval(reload, 5000);
|
||||||
|
|
||||||
const url = new URL('api', location.href);
|
const url = new URL('api', location.href);
|
||||||
fetch(url, {cache: 'no-cache'}).then(r => r.json()).then(data => {
|
fetch(url, {cache: 'no-cache'}).then(r => r.json()).then(data => {
|
||||||
const info = document.querySelector('.info');
|
const info = document.querySelector('.info');
|
||||||
|
|||||||
Reference in New Issue
Block a user