17 lines
418 B
JavaScript
17 lines
418 B
JavaScript
function getStartUrl() {
|
|
const url = new URL(window.location.href);
|
|
const params = new URLSearchParams(url.search);
|
|
params.delete("delay");
|
|
return url.pathname + "?" + params.toString();
|
|
}
|
|
|
|
async function refresh() {
|
|
const ping_url = document.body.dataset.pingurl;
|
|
if (ping_url) {
|
|
await fetch(ping_url, {
|
|
method: "GET",
|
|
mode: "no-cors",
|
|
});
|
|
}
|
|
window.location.href = getStartUrl();
|
|
} |