tor-browser

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

file_documentdomain.html (829B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4 <script type="application/javascript">
      5 
      6  function setDomain(domain) {
      7    document.domain = domain;
      8  }
      9 
     10  function tryToAccess(otherWin) {
     11    try {
     12      var text = otherWin.document.getElementById('foo').innerHTML;
     13      return /Better Late/.exec(text);
     14    } catch (e) { return false; }
     15  }
     16 
     17  var gRef = null;
     18  function storeReference(otherWin) {
     19    gRef = otherWin.document.getElementById('foo');
     20  }
     21 
     22  function tryToAccessStored() {
     23    try {
     24      return /Better Late/.exec(gRef.innerHTML);
     25    } catch (e) { return false; }
     26  }
     27 
     28  function invokingFunctionThrowsSecurityException(name) {
     29    try {
     30      window[name]();
     31      return false;
     32    } catch (e) { return /insecure|denied/.test(e); }
     33  }
     34 
     35 
     36 </script>
     37 </head>
     38 <body>
     39 <span id="foo">Better Late than Never</span>
     40 </body>
     41 </html>