tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

notification_show_dedicated.js (262B)


      1 onmessage = async ev => {
      2  if (ev.data !== "show") {
      3    return;
      4  }
      5  const reg = await navigator.serviceWorker.getRegistration();
      6  const shown = await reg.showNotification("title").then(
      7    () => true,
      8    () => false
      9  );
     10  self.postMessage({ shown });
     11 };