tor-browser

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

battery-status.https.html (849B)


      1 <!DOCTYPE html>
      2 <script src="/common/utils.js"></script>
      3 <script src="/resources/testharness.js"></script>
      4 <script src="/resources/testharnessreport.js"></script>
      5 <script src="/speculation-rules/prerender/resources/utils.js"></script>
      6 <script src="/speculation-rules/prerender/resources/deferred-promise-utils.js"></script>
      7 <script>
      8 
      9 // The main test page (restriction-battery-status.html) loads the initiator
     10 // page, then the initiator page will prerender itself with the `prerendering`
     11 // parameter.
     12 const params = new URLSearchParams(location.search);
     13 if (!params.has('prerendering')) {
     14  const rule_extras = {'target_hint': getTargetHint()};
     15  loadInitiatorPage(rule_extras);
     16 } else {
     17  const prerenderEventCollector = new PrerenderEventCollector();
     18  prerenderEventCollector.start(navigator.getBattery(), 'navigator.getBattery');
     19 }
     20 
     21 </script>