2017-11-28 16:10:31 +09:00
|
|
|
<!DOCTYPE html>
|
|
|
|
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<title>Misskeyのリカバリ</title>
|
|
|
|
<script>
|
|
|
|
|
2017-11-28 16:31:50 +09:00
|
|
|
const yn = window.confirm('キャッシュをクリアしますか?\n\nDo you want to clear caches?');
|
2017-11-28 16:10:31 +09: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 16:11:57 +09:00
|
|
|
|
|
|
|
location.href = '/';
|
2017-11-28 16:10:31 +09:00
|
|
|
} else {
|
|
|
|
alert('問題が解決しない場合はサーバー管理者までお問い合せください。');
|
|
|
|
}
|
|
|
|
|
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
</html>
|