<!DOCTYPE html>
<html>
<body>
<p>Loading...</p>
<script>
async function install() {
  let script;
  for (const q of location.search.slice(1).split('&')) {
    if (q.split('=')[0] === 'script') {
      script = q.split('=')[1];
    }
  }
  const scope = location.href;
  const reg = await navigator.serviceWorker.register(script, {scope});
  await navigator.serviceWorker.ready;
  location.reload();
}

install();
</script>
</body>
</html>
