Skip to content

Commit

Permalink
fix: 修复重启时不刷新页面的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Keldos-Li committed Mar 5, 2024
1 parent 414815f commit 740f454
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions web_assets/javascript/utils.js
Expand Up @@ -92,6 +92,18 @@ function rebootingChuanhu() {
pageInfo.innerHTML += '<h1 style="position: absolute; left: 50%; top: 50%; transform: translateX(-50%); color: lightgray; text-align: center; font-family: sans-serif;">Rebooting...</h1>'
document.body.innerHTML = '';
document.body.appendChild(pageInfo);

var requestPing = function () {
requestGet("./file=web_assets/manifest.json", {}, function (data) {
location.reload();
}, function () {
setTimeout(requestPing, 500);
});
};

setTimeout(requestPing, 4000);

return [];
}

/* NOTE: These reload functions are not used in the current version of the code.
Expand Down

0 comments on commit 740f454

Please sign in to comment.