tor-browser

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

doc_backward_forward_navigation.html (1219B)


      1 <!-- Any copyright is dedicated to the Public Domain.
      2     http://creativecommons.org/publicdomain/zero/1.0/ -->
      3 <!doctype html>
      4 <html>
      5  <head>
      6    <meta charset="utf-8"/>
      7    <title>Test backward/forward navigation</title>
      8  </head>
      9  <body>
     10    <ul class="logs"></ul>
     11    <script>
     12      const query = new URLSearchParams(document.location.search);
     13      const noMutation = query.has("no-mutation");
     14 
     15      /* Add stylesheet, script and dom nodes so it triggers multiple actions in the toolbox. */
     16      function addContent() {
     17        const now = Date.now();
     18 
     19        const styleSheetEl = document.createElement("link");
     20        styleSheetEl.href = "./doc_theme.css?id=" + now;
     21        document.head.append(styleSheetEl);
     22 
     23        const scriptEl = document.createElement("script");
     24        scriptEl.src = "./code_inline_bundle.js?id=" + now;
     25        document.body.append(scriptEl);
     26 
     27        const li = document.createElement("li");
     28        li.textContent = now;
     29        document.querySelector("ul.logs").append(li);
     30      }
     31 
     32      if (noMutation) {
     33        document.body.classList.add("no-mutation");
     34        addContent();
     35      } else {
     36        setInterval(addContent, 200);
     37      }
     38    </script>
     39  </body>
     40 </html>