summaryrefslogtreecommitdiff
path: root/src/server/web/views/flush.pug
blob: f279c236051a16ddfc15e7935783f4f7b962d08a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
doctype html

html
	script.
		localStorage.removeItem('locale');

		try {
			navigator.serviceWorker.controller.postMessage('clear');

			navigator.serviceWorker.getRegistrations().then(registrations => {
				return Promise.all(registrations.map(registration => registration.unregister()));
			}).then(() => {
				location = '/';
			});
		} catch (e) {
			console.error(e);
			setTimeout(() => {
				location = '/';
			}, 10000)
		}