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(); }