<commit_before>document
  .querySelectorAll('pre')
  .forEach(node => {
    node.title = 'Copy to clipboard';
    node.classList.add('copy');
    node.onclick = function (event) {
      navigator.clipboard.writeText(event.target.innerText);
    };
  });

(function () {
  const themes = [ 'light', 'dark', 'markdown' ];
  let theme = localStorage.getItem('theme') || 'light';
  const updateTheme = function () {
    document.body.className = theme;
  };
  updateTheme();

  const themeSwitch = document.getElementById('theme-switch');
  themeSwitch.style.display = null;
  themeSwitch.onclick = function () {
    theme = themes[(themes.indexOf(theme) + 1) % themes.length];
    localStorage.setItem('theme', theme);
    updateTheme();
  };
}());

(function () {
  const location = document.location.pathname;
  const referrer = new URLSearchParams(document.location.search).get('ref') || document.referrer;
  fetch(
    'https://log-lusmo-re.azurewebsites.net/api/log',
    {
      method: 'POST',
      body: JSON.stringify({ location, referrer })
    }
  );
}());<commit_msg>Honour DNT<commit_after>document
  .querySelectorAll('pre')
  .forEach(node => {
    node.title = 'Copy to clipboard';
    node.classList.add('copy');
    node.onclick = function (event) {
      navigator.clipboard.writeText(event.target.innerText);
    };
  });

(function () {
  const themes = [ 'light', 'dark', 'markdown' ];
  let theme = localStorage.getItem('theme') || 'light';
  const updateTheme = function () {
    document.body.className = theme;
  };
  updateTheme();

  const themeSwitch = document.getElementById('theme-switch');
  themeSwitch.style.display = null;
  themeSwitch.onclick = function () {
    theme = themes[(themes.indexOf(theme) + 1) % themes.length];
    localStorage.setItem('theme', theme);
    updateTheme();
  };
}());

(function () {
  if (navigator.doNotTrack) return;
  const location = document.location.pathname;
  const referrer = new URLSearchParams(document.location.search).get('ref') || document.referrer;
  fetch(
    'https://log-lusmo-re.azurewebsites.net/api/log',
    {
      method: 'POST',
      body: JSON.stringify({ location, referrer })
    }
  );
}());
{'fraction_non_alphanumeric': 0.16918152720621857, 'fraction_numerical': 0.0009144947416552355, 'mean_word_length': 3.675213675213675, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5230168', 'n_tokens_mistral': 690, 'n_tokens_neox': 686, 'n_words': 122}