tor-browser

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

noreferrer-target.html (568B)


      1 <script>
      2  const channelName = location.search.substr(1),
      3        channel = new BroadcastChannel(channelName);
      4  channel.postMessage({ name: window.name,
      5                        haveOpener: window.opener !== null,
      6                        referrer: document.referrer });
      7 
      8  // Because messages are not delivered synchronously and because closing a
      9  // browsing context prompts the eventual clearing of all task sources, this
     10  // document should not be closed until the opener document has confirmed
     11  // receipt.
     12  channel.onmessage = () => window.close();
     13 </script>