aboutsummaryrefslogtreecommitdiffstats
path: root/index.html
blob: 26592e18011aff5aafdbb19ee49eca7aa46f5288 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<!DOCTYPE html>
<html>
<head>
	<title>Placeholder</title>
	<link rel="manifest" href="/pwathings/manifest.json" />
	<link rel="manifest" href="/pwathings/manifest.json" />
	<script>
		var reg;
	  window.addEventListener("load", async function() {
			reg = await navigator.serviceWorker.getRegistrations();
			if (reg.length) document.getElementById("enabler").innerText = "Click to refresh the Service Worker!";
		});
		const reloader = () => Promise.all(reg.map(r => r.unregister())).then(() => navigator.serviceWorker.register('/worker.js', {scope: '/'}));
	</script>
</head>
<body>
	<ul>
		<li><a href="/searcher">Chip Searcher</a></li>
		<li><a href="/grapher">Chip Grapher</a></li>
		<li><button id="enabler" onclick="reloader();">Click to enable offline use!</button></li>
	</ul>
</body>
</html>