|
|
@ -33,10 +33,7 @@ if (location.hostname !== "localhost")
|
|
|
|
if (!res.ok) return;
|
|
|
|
if (!res.ok) return;
|
|
|
|
res.text().then(serverVersion =>
|
|
|
|
res.text().then(serverVersion =>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (res.status)
|
|
|
|
if (res.status && serverVersion && version !== serverVersion)
|
|
|
|
if (serverVersion)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (version !== serverVersion)
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
document.body.style.cssText = `
|
|
|
|
document.body.style.cssText = `
|
|
|
|
text-align: center;
|
|
|
|
text-align: center;
|
|
|
@ -49,7 +46,6 @@ if (location.hostname !== "localhost")
|
|
|
|
document.body.textContent = "发现新版本,升级中!";
|
|
|
|
document.body.textContent = "发现新版本,升级中!";
|
|
|
|
location.reload();
|
|
|
|
location.reload();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|