Spaces:
Sleeping
Sleeping
Keldos
commited on
Commit
·
740f454
1
Parent(s):
414815f
fix: 修复重启时不刷新页面的问题
Browse files
web_assets/javascript/utils.js
CHANGED
@@ -92,6 +92,18 @@ function rebootingChuanhu() {
|
|
92 |
pageInfo.innerHTML += '<h1 style="position: absolute; left: 50%; top: 50%; transform: translateX(-50%); color: lightgray; text-align: center; font-family: sans-serif;">Rebooting...</h1>'
|
93 |
document.body.innerHTML = '';
|
94 |
document.body.appendChild(pageInfo);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
}
|
96 |
|
97 |
/* NOTE: These reload functions are not used in the current version of the code.
|
|
|
92 |
pageInfo.innerHTML += '<h1 style="position: absolute; left: 50%; top: 50%; transform: translateX(-50%); color: lightgray; text-align: center; font-family: sans-serif;">Rebooting...</h1>'
|
93 |
document.body.innerHTML = '';
|
94 |
document.body.appendChild(pageInfo);
|
95 |
+
|
96 |
+
var requestPing = function () {
|
97 |
+
requestGet("./file=web_assets/manifest.json", {}, function (data) {
|
98 |
+
location.reload();
|
99 |
+
}, function () {
|
100 |
+
setTimeout(requestPing, 500);
|
101 |
+
});
|
102 |
+
};
|
103 |
+
|
104 |
+
setTimeout(requestPing, 4000);
|
105 |
+
|
106 |
+
return [];
|
107 |
}
|
108 |
|
109 |
/* NOTE: These reload functions are not used in the current version of the code.
|