tor-browser

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

navigate.html (690B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <script src="/cookies/resources/cookie-helper.sub.js"></script>
      4 <script>
      5  window.addEventListener('load', function() {
      6    if (window.opener)
      7      window.opener.postMessage({ type: 'READY' }, '*');
      8    if (window.parent !== window)
      9      window.parent.postMessage({ type: 'FRAME_READY' }, '*');
     10  });
     11 
     12  window.addEventListener('message', function(e) {
     13    if (e.data.type === "navigate") {
     14      window.location = e.data.url;
     15    }
     16 
     17    if (e.data.type === "post-form") {
     18      var f = document.createElement('form');
     19      f.action = e.data.url;
     20      f.method = "POST";
     21      document.body.appendChild(f);
     22      f.submit();
     23    }
     24  });
     25 </script>