2017-11-28 08:10:31 +01:00
|
|
|
<!DOCTYPE html>
|
|
|
|
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<title>Misskeyのリカバリ</title>
|
|
|
|
<script>
|
|
|
|
|
2017-11-28 08:31:50 +01:00
|
|
|
const yn = window.confirm('キャッシュをクリアしますか?\n\nDo you want to clear caches?');
|
2017-11-28 08:10:31 +01:00
|
|
|
|
|
|
|
if (yn) {
|
|
|
|
try {
|
|
|
|
navigator.serviceWorker.controller.postMessage('clear');
|
|
|
|
|
|
|
|
navigator.serviceWorker.getRegistrations().then(registrations => {
|
|
|
|
registrations.forEach(registration => registration.unregister());
|
|
|
|
});
|
|
|
|
|
|
|
|
} catch (e) {
|
|
|
|
console.error(e);
|
|
|
|
}
|
|
|
|
|
|
|
|
localStorage.setItem('should-refresh', 'true');
|
|
|
|
|
|
|
|
alert('キャッシュをクリアしました。');
|
2017-11-28 08:11:57 +01:00
|
|
|
|
|
|
|
location.href = '/';
|
2017-11-28 08:10:31 +01:00
|
|
|
} else {
|
|
|
|
alert('問題が解決しない場合はサーバー管理者までお問い合せください。');
|
|
|
|
}
|
|
|
|
|
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
</html>
|