tor-browser

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

iframe-iframe.html (879B)


      1 <!doctype html>
      2 <meta charset="utf-8">
      3 <script src="/resources/testdriver.js"></script>
      4 <script src="/resources/testdriver-vendor.js"></script>
      5 <body>
      6 <script>
      7 // Step 4 (workers/same-site-cookies/third-party.{})
      8 test_driver.set_test_context(window.top);
      9 const type = (new URLSearchParams(window.location.search)).get("type");
     10 let options = {};
     11 switch (type) {
     12    case "default":
     13        break;
     14    case "all":
     15        options.sameSiteCookies = "all";
     16        break;
     17    case "none":
     18        options.sameSiteCookies = "none";
     19        break;
     20 }
     21 // Step 7 (workers/same-site-cookies/third-party.{})
     22 try {
     23    const worker = new SharedWorker("/workers/same-site-cookies/resources/worker_redirect.py", options);
     24    worker.port.onmessage = (e) => {
     25        window.top.postMessage(e.data, "*");
     26    };
     27 } catch (_) {
     28    window.top.postMessage("DidNotStart", "*");
     29 }
     30 </script>
     31 </body>