a9a581adcb
This reverts commit 8c70c9d6a0
.
35 lines
794 B
HTML
35 lines
794 B
HTML
<!DOCTYPE html>
|
|
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Misskeyのリカバリ</title>
|
|
<script>
|
|
|
|
const yn = window.confirm('キャッシュをクリアしますか?\n\nDo you want to clear caches?');
|
|
|
|
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('キャッシュをクリアしました。');
|
|
|
|
location.href = '/';
|
|
} else {
|
|
alert('問題が解決しない場合はサーバー管理者までお問い合せください。');
|
|
}
|
|
|
|
</script>
|
|
</head>
|
|
</html>
|