iceshrimp-legacy/src/web/assets/404.js
2018-03-15 12:56:50 +09:00

22 lines
701 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

const yn = window.confirm(
'サーバー上に存在しないスクリプトがリクエストされました。お使いのMisskeyのバージョンが古いことが原因の可能性があります。Misskeyを更新しますか');
if (yn) {
// Clear cache (serive worker)
try {
navigator.serviceWorker.controller.postMessage('clear');
navigator.serviceWorker.getRegistrations().then(registrations => {
registrations.forEach(registration => registration.unregister());
});
} catch (e) {
console.error(e);
}
localStorage.removeItem('v');
location.reload(true);
} else {
alert('問題が解決しない場合はサーバー管理者までお問い合せください。');
}