tor-browser

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

html_json-empty.html (1133B)


      1 <!-- Any copyright is dedicated to the Public Domain.
      2     http://creativecommons.org/publicdomain/zero/1.0/ -->
      3 <!doctype html>
      4 
      5 <html>
      6  <head>
      7    <meta charset="utf-8"/>
      8    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
      9    <meta http-equiv="Pragma" content="no-cache" />
     10    <meta http-equiv="Expires" content="0" />
     11    <title>Network Monitor test page</title>
     12  </head>
     13 
     14  <body>
     15    <p>Empty JSON test page</p>
     16 
     17    <script type="text/javascript">
     18      /* exported performRequests */
     19      "use strict";
     20 
     21      function get(address) {
     22        return new Promise(resolve => {
     23          const xhr = new XMLHttpRequest();
     24          xhr.open("GET", address, true);
     25 
     26          xhr.onreadystatechange = function() {
     27            if (this.readyState == this.DONE) {
     28              resolve();
     29            }
     30          };
     31          xhr.send(null);
     32        });
     33      }
     34 
     35      async function performRequests() {
     36        // Forward the query parameter for this page to sjs_json-test-server
     37        await get("sjs_json-test-server.sjs" + window.location.search);
     38      }
     39    </script>
     40  </body>
     41 
     42 </html>