tor-browser

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

popup_blocker_frame.html (733B)


      1 <!doctype html>
      2 <html>
      3  <head>
      4    <meta charset="UTF-8">
      5    <title>Page with iframe that contains page that opens two popups</title>
      6  </head>
      7  <body>
      8    <iframe id="iframe"></iframe>
      9    <script type="text/javascript">
     10      let params = new URLSearchParams(location.search);
     11      let base = params.get('base') || location.href;
     12      let frame = document.getElementById('iframe');
     13 
     14      function addPopupOpeningFrame() {
     15        frame.src = new URL("popup_blocker.html", base);
     16      }
     17 
     18      if (params.get('delayed') !== 'true') {
     19        addPopupOpeningFrame();
     20      } else {
     21        addEventListener("message", () => {
     22          addPopupOpeningFrame();
     23        }, {once: true});
     24      }
     25    </script>
     26  </body>
     27 </html>