改进部署组件

This commit is contained in:
2025-08-14 11:16:43 +08:00
parent 28ccfdd227
commit 4ad289d02d
2 changed files with 19 additions and 19 deletions

View File

@@ -0,0 +1,17 @@
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();
}