<commit_before>{% extends "layout.html" %}

{% block head %}
  <script src="static/plugin-detect-0.6.3.js" type="text/javascript"></script>
  <script src="static/deployJava.js" type="text/javascript"></script>
  <script src="{{ url_for('bower.static', filename='jquery.flash/jquery.flash.js') }}" type="text/javascript"></script>
  <script src="static/fp2.js" type="text/javascript"></script>
  <script src="static/trkTestVars.js" type="text/javascript"></script>
  <link href="https://chrome.google.com/webstore/detail/pkehgijcmpdhfbdbbnkijodmdjhbjlgp" rel="chrome-webstore-item" />
{% endblock %}

{% block body %}
  <p>
    How well are you protected against non-consensual Web tracking? After analyzing your browser and add-ons, the answer is ...
  </p>

  <div id='results_wrapper'>
    <p id='summary_sentence'></p>
    <table class='tracker_results' id='results'>
      <tbody>
        <tr>
          <th>
            Test
          </th>
          <th>
            Result
          </th>
        </tr>
        <tr>
          <td class='test_label'>Is your browser blocking tracking ads?</td>
          <td id='ad_status'><img src='/static/images/ajax-loader.gif' alt='loading...'></td>
        </tr>
        <tr>
          <td class='test_label'>Is your browser blocking invisible trackers?</td>
          <td id='tracker_status'><img src='/static/images/ajax-loader.gif' alt='loading...'></td>
        </tr>
        <tr>
          <td class='test_label'>Does your browser unblock 3rd parties that promise to honor <a href='https://www.eff.org/dnt-policy'>Do Not Track</a>?</td>
          <td id='dnt_status'><img src='/static/images/ajax-loader.gif' alt='loading...'></td>
        </tr>
        <tr>
          <td class='test_label'>Does your browser protect from <a id='showFingerprintLink1' href='#fingerprintTable'>fingerprinting</a>?</td>
          <td id='fp_status'><img src='/static/images/ajax-loader.gif' alt='loading...'></td>
        </tr>
      </tbody>
    </table>
    <a id='showFingerprintLink2' href='#fingerprintTable'>Show full results for fingerprinting</a>
    <p class="tracker_results">Note: because tracking techniques are complex, subtle, and constantly evolving, Panopticlick does not measure all forms of tracking and protection.</p>
    <div id='fingerprintTable'></div>
    <div id="buttons">
      <div class="row">
        <a href="/tracker" class="circle" id="trackerlink" title="Click here to re-test how trackable your browser is">Re-test your browser</a>
      </div>
    </div>
    <div class="fingerprint-thanks">
      <font size='-2'>Thanks to <a href='https://github.com/Valve/fingerprintjs2'>Fingerprint2</a> for various fingerprinting tests, <a href='http://www.aloodo.org/'>Aloodo</a> for portions of the tracker test, <a href="http://browserspy.dk">browserspy.dk</a> for the font detection code, and to <a href="https://labs.isecpartners.com/breadcrumbs/breadcrumbs.html">breadcrumbs</a> for supercookie help. Send questions or comments to <a href="mailto:<EMAIL>"><EMAIL></a>.</font>
    </div>
  </div>
  <iframe id="a" style="position:absolute;right:0px;bottom:0px;height:1px;width:1px;"></iframe>
  <iframe id="t" style="position:absolute;left:0px;bottom:0px;height:1px;width:1px;"></iframe>
  <iframe id="dnt" style="position:absolute;left:0px;bottom:0px;height:1px;width:1px;"></iframe>
  <script type="text/javascript">
    ghostery_enabled = true;
    var status_str = {
      'yes'    : "{% include '_yes.html' %}",
      'no'     : "{% include '_no.html' %}",
      'partial': "{% include '_partial.html' %}"
    };
    var fp_status_str = {
      'yes'      : "{% include '_fp_yes.html' %}",
      'no'       : "{% include '_fp_no.html' %}",
      'no_unique': "{% include '_fp_no_unique.html' %}",
      'partial'  : "{% include '_fp_partial.html' %}"
    };
    var download_links = "{% include '_summary_download_links.html' %}";
    window.onload = function(){
      document.getElementById('fingerprintTable').style.display = "none";
      document.getElementById('buttons').style.display = "none";

      var a_loads = {{ a_loads }};
      var t_loads = {{ t_loads }};
      var dnt_loads = {{ dnt_loads }};

      (function fingerprint_table_ux(){
        var showFingerprintLink1 = document.getElementById('showFingerprintLink1');
        var showFingerprintLink2 = document.getElementById('showFingerprintLink2');
        var fingerprintTable = document.getElementById('fingerprintTable')

        showFingerprintLink1.onclick = showFingerprintLink2.onclick = function(){
          showFingerprintLink2.style.display = 'none';
          fingerprintTable.style.display = 'block';
        };
      })();

      (function load_iframes(){
        var cb = Math.floor((Math.random()*1000000)+1);
        var a = document.getElementById('a');
        a.src = 'https://{{ third_party_trackers['ad_server'] }}/tracking-tally?&random=' + cb;

        var t = document.getElementById('t');
        t.src = 'https://{{ third_party_trackers['tracker_server'] }}/tracking-tally?&random=' + cb;

        var dnt = document.getElementById('dnt');
        dnt.src = 'https://{{ third_party_trackers['dnt_server'] }}/tracking-tally?&random=' + cb;

        var trackerlink = document.getElementById('trackerlink');
        trackerlink.onclick = function clearCookies(){
          a.src = 'https://{{ third_party_trackers['ad_server'] }}/clear-cookies?&random=' + cb;
          t.src = 'https://{{ third_party_trackers['tracker_server'] }}/clear-cookies?&random=' + cb;
          dnt.src = 'https://{{ third_party_trackers['dnt_server'] }}/clear-cookies?&random=' + cb;

          setTimeout(function(){
            window.location = trackerlink.href;
          }, 2000);
          return false;
        }
      })();

      var results = {'known_blockers': []};
      function display_results(){
        var metrics = ['ad', 'tracker', 'dnt'];

        for(x in metrics){
          var metric = metrics[x];
          if(metric in results){
            document.getElementById(metric + '_status').innerHTML = status_str[results[metric]];
          }
        }
      }

      var counter = 0;
      var sites_responding = {};
      var tracker_assumed_status;
      var ad_assumed_status;
      (function handle_cross_origin_communication(){
        window.addEventListener("message", receiveMessage, false);

        function receiveMessage(event){
          counter++;
          sites_responding[event.origin] = true;
          if(event.origin == "https://{{ third_party_trackers['ad_server'] }}"){
            a_cookies = event.data.split(" ").length;
            if(a_loads == 3){
              if(a_loads > a_cookies){
                ad_assumed_status = 'partial';
              } else {
                ad_assumed_status = 'no';
              }
            } else {
              var acceptable_ad = document.createElement('img');
              acceptable_ad.onload = function(){
                results['ad'] = 'partial';<commit_msg>Ensuring referrer header is not sent along to external resource<commit_after>{% extends "layout.html" %}

{% block head %}
  <script src="static/plugin-detect-0.6.3.js" type="text/javascript"></script>
  <script src="static/deployJava.js" type="text/javascript"></script>
  <script src="{{ url_for('bower.static', filename='jquery.flash/jquery.flash.js') }}" type="text/javascript"></script>
  <script src="static/fp2.js" type="text/javascript"></script>
  <script src="static/trkTestVars.js" type="text/javascript"></script>
  <link href="https://chrome.google.com/webstore/detail/pkehgijcmpdhfbdbbnkijodmdjhbjlgp" rel="chrome-webstore-item" />
{% endblock %}

{% block body %}
  <p>
    How well are you protected against non-consensual Web tracking? After analyzing your browser and add-ons, the answer is ...
  </p>

  <div id='results_wrapper'>
    <p id='summary_sentence'></p>
    <table class='tracker_results' id='results'>
      <tbody>
        <tr>
          <th>
            Test
          </th>
          <th>
            Result
          </th>
        </tr>
        <tr>
          <td class='test_label'>Is your browser blocking tracking ads?</td>
          <td id='ad_status'><img src='/static/images/ajax-loader.gif' alt='loading...'></td>
        </tr>
        <tr>
          <td class='test_label'>Is your browser blocking invisible trackers?</td>
          <td id='tracker_status'><img src='/static/images/ajax-loader.gif' alt='loading...'></td>
        </tr>
        <tr>
          <td class='test_label'>Does your browser unblock 3rd parties that promise to honor <a href='https://www.eff.org/dnt-policy'>Do Not Track</a>?</td>
          <td id='dnt_status'><img src='/static/images/ajax-loader.gif' alt='loading...'></td>
        </tr>
        <tr>
          <td class='test_label'>Does your browser protect from <a id='showFingerprintLink1' href='#fingerprintTable'>fingerprinting</a>?</td>
          <td id='fp_status'><img src='/static/images/ajax-loader.gif' alt='loading...'></td>
        </tr>
      </tbody>
    </table>
    <a id='showFingerprintLink2' href='#fingerprintTable'>Show full results for fingerprinting</a>
    <p class="tracker_results">Note: because tracking techniques are complex, subtle, and constantly evolving, Panopticlick does not measure all forms of tracking and protection.</p>
    <div id='fingerprintTable'></div>
    <div id="buttons">
      <div class="row">
        <a href="/tracker" class="circle" id="trackerlink" title="Click here to re-test how trackable your browser is">Re-test your browser</a>
      </div>
    </div>
    <div class="fingerprint-thanks">
      <font size='-2'>Thanks to <a href='https://github.com/Valve/fingerprintjs2'>Fingerprint2</a> for various fingerprinting tests, <a href='http://www.aloodo.org/'>Aloodo</a> for portions of the tracker test, <a href="http://browserspy.dk">browserspy.dk</a> for the font detection code, and to <a href="https://labs.isecpartners.com/breadcrumbs/breadcrumbs.html">breadcrumbs</a> for supercookie help. Send questions or comments to <a href="mailto:<EMAIL>"><EMAIL></a>.</font>
    </div>
  </div>
  <iframe id="a" style="position:absolute;right:0px;bottom:0px;height:1px;width:1px;"></iframe>
  <iframe id="t" style="position:absolute;left:0px;bottom:0px;height:1px;width:1px;"></iframe>
  <iframe id="dnt" style="position:absolute;left:0px;bottom:0px;height:1px;width:1px;"></iframe>
  <script type="text/javascript">
    ghostery_enabled = true;
    var status_str = {
      'yes'    : "{% include '_yes.html' %}",
      'no'     : "{% include '_no.html' %}",
      'partial': "{% include '_partial.html' %}"
    };
    var fp_status_str = {
      'yes'      : "{% include '_fp_yes.html' %}",
      'no'       : "{% include '_fp_no.html' %}",
      'no_unique': "{% include '_fp_no_unique.html' %}",
      'partial'  : "{% include '_fp_partial.html' %}"
    };
    var download_links = "{% include '_summary_download_links.html' %}";
    window.onload = function(){
      document.getElementById('fingerprintTable').style.display = "none";
      document.getElementById('buttons').style.display = "none";

      var a_loads = {{ a_loads }};
      var t_loads = {{ t_loads }};
      var dnt_loads = {{ dnt_loads }};

      (function fingerprint_table_ux(){
        var showFingerprintLink1 = document.getElementById('showFingerprintLink1');
        var showFingerprintLink2 = document.getElementById('showFingerprintLink2');
        var fingerprintTable = document.getElementById('fingerprintTable')

        showFingerprintLink1.onclick = showFingerprintLink2.onclick = function(){
          showFingerprintLink2.style.display = 'none';
          fingerprintTable.style.display = 'block';
        };
      })();

      (function load_iframes(){
        var cb = Math.floor((Math.random()*1000000)+1);
        var a = document.getElementById('a');
        a.src = 'https://{{ third_party_trackers['ad_server'] }}/tracking-tally?&random=' + cb;

        var t = document.getElementById('t');
        t.src = 'https://{{ third_party_trackers['tracker_server'] }}/tracking-tally?&random=' + cb;

        var dnt = document.getElementById('dnt');
        dnt.src = 'https://{{ third_party_trackers['dnt_server'] }}/tracking-tally?&random=' + cb;

        var trackerlink = document.getElementById('trackerlink');
        trackerlink.onclick = function clearCookies(){
          a.src = 'https://{{ third_party_trackers['ad_server'] }}/clear-cookies?&random=' + cb;
          t.src = 'https://{{ third_party_trackers['tracker_server'] }}/clear-cookies?&random=' + cb;
          dnt.src = 'https://{{ third_party_trackers['dnt_server'] }}/clear-cookies?&random=' + cb;

          setTimeout(function(){
            window.location = trackerlink.href;
          }, 2000);
          return false;
        }
      })();

      var results = {'known_blockers': []};
      function display_results(){
        var metrics = ['ad', 'tracker', 'dnt'];

        for(x in metrics){
          var metric = metrics[x];
          if(metric in results){
            document.getElementById(metric + '_status').innerHTML = status_str[results[metric]];
          }
        }
      }

      var counter = 0;
      var sites_responding = {};
      var tracker_assumed_status;
      var ad_assumed_status;
      (function handle_cross_origin_communication(){
        window.addEventListener("message", receiveMessage, false);

        function receiveMessage(event){
          counter++;
          sites_responding[event.origin] = true;
          if(event.origin == "https://{{ third_party_trackers['ad_server'] }}"){
            a_cookies = event.data.split(" ").length;
            if(a_loads == 3){
              if(a_loads > a_cookies){
                ad_assumed_status = 'partial';
              } else {
                ad_assumed_status = 'no';
              }
            } else {
              var meta = document.createElement('meta');
              meta.name = "referrer";
              meta.content = "no-referrer";
              document.getElementsByTagName('head')[0].appendChild(meta);

              var acceptable_ad = document.createElement('img');
              acceptable_ad.onload = function(){
                results['ad'] = 'partial';
{'fraction_non_alphanumeric': 0.1640942893222955, 'fraction_numerical': 0.006103549880735232, 'mean_word_length': 2.940022111663903, 'pattern_counts': {'":': 0, '<': 191, '<?xml version=': 0, '>': 193, 'https://': 22, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3588896', 'n_tokens_mistral': 4480, 'n_tokens_neox': 4360, 'n_words': 848}