开发:清理代码

pull/1466/MERGE
ChenX 4 years ago
parent fc2a51b0bb
commit d252dc94ef

@ -33,23 +33,19 @@ if (location.hostname !== "localhost")
if (!res.ok) return;
res.text().then(serverVersion =>
{
if (res.status)
if (serverVersion)
{
if (version !== serverVersion)
{
document.body.style.cssText = `
text-align: center;
display: flex;
align-items: center;
justify-content: center;
font-size: 30px;
flex-direction: column;
`;
document.body.textContent = "发现新版本,升级中!";
location.reload();
}
}
if (res.status && serverVersion && version !== serverVersion)
{
document.body.style.cssText = `
text-align: center;
display: flex;
align-items: center;
justify-content: center;
font-size: 30px;
flex-direction: column;
`;
document.body.textContent = "发现新版本,升级中!";
location.reload();
}
});
});
}

Loading…
Cancel
Save