tor-browser

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

topics-not-allowed-for-service-worker-fetch-helper.tentative.https.html (709B)


      1 <!doctype html>
      2 <body>
      3  <script>
      4    var current_url = window.location.href;
      5    var fetch_url = current_url.substring(0, current_url.lastIndexOf("/")) + '/check-topics-request-header.py'
      6 
      7    navigator.serviceWorker.addEventListener('message', e => {
      8      if (e.data.topicsHeader === 'NO_TOPICS_HEADER') {
      9        window.opener.postMessage({testResult: 'Topics fetch initiated from service worker did not include the topics header'}, '*');
     10      } else {
     11        window.opener.postMessage({testResult: 'Topics fetch initiated from service worker included the topics header'}, '*');
     12      }
     13    });
     14 
     15    navigator.serviceWorker.controller.postMessage({
     16      fetchUrl: fetch_url
     17    });
     18  </script>
     19 </body>