<commit_before>if (window.location.search != "") {
  window_href = window.location.href;
  
  // Remove tracking crap
  window_href = window_href.replace(/utm_source=[^&]*(&|$)/, ''); // Google analytics tracking variable
  window_href = window_href.replace(/utm_medium=[^&]*(&|$)/, ''); // Google analytics tracking variable
  window_href = window_href.replace(/utm_campaign=[^&]*(&|$)/, ''); // Google analytics tracking variable
  window_href = window_href.replace(/utm_content=[^&]*(&|$)/, ''); // Google analytics tracking variable
  window_href = window_href.replace(/utm_term=[^&]*(&|$)/, ''); // Google analytics tracking variable
  window_href = window_href.replace(/partner=[^&]*(&|$)/, ''); // From nytimes.com feeds
  window_href = window_href.replace(/emc=[^&]*(&|$)/, '');  // From nytimes.com feeds
  window_href = window_href.replace(/lsrc=[^&]*(&|$)/, '');  // From macworld.com feeds
  window_href = window_href.replace(/eref=[^&]*(&|$)/, ''); // From cnn.com feeds
  window_href = window_href.replace(/ref=[^&]*(&|$)/, ''); // From cbc.ca/news feeds
  window_href = window_href.replace(/bn=[^&]*(&|$)/, ''); // From thestar.com links
  window_href = window_href.replace(/cmpid=[^&]*(&|$)/, ''); // From theglobeandmail.com links
  
  // If the string ends with the '?' character (no more GET variables left), remove it
  window_href = window_href.replace(/\?$/, '');
  
  // If the href has changed, update it
  if (window.location.href != window_href) {
    window.location.href = window_href;
  }
}<commit_msg>match whole url parameters (so that ref= doesn't match href=, fixes Facebook Like button)<commit_after>if (window.location.search != "") {
  window_href = window.location.href;
  
  // Remove tracking crap
  window_href = window_href.replace(/([&?])utm_source=[^&]*(?:&|$)/, '$1'); // Google analytics tracking variable
  window_href = window_href.replace(/([&?])utm_medium=[^&]*(?:&|$)/, '$1'); // Google analytics tracking variable
  window_href = window_href.replace(/([&?])utm_campaign=[^&]*(?:&|$)/, '$1'); // Google analytics tracking variable
  window_href = window_href.replace(/([&?])utm_content=[^&]*(?:&|$)/, '$1'); // Google analytics tracking variable
  window_href = window_href.replace(/([&?])utm_term=[^&]*(?:&|$)/, '$1'); // Google analytics tracking variable
  window_href = window_href.replace(/([&?])partner=[^&]*(?:&|$)/, '$1'); // From nytimes.com feeds
  window_href = window_href.replace(/([&?])emc=[^&]*(?:&|$)/, '$1');  // From nytimes.com feeds
  window_href = window_href.replace(/([&?])lsrc=[^&]*(?:&|$)/, '$1');  // From macworld.com feeds
  window_href = window_href.replace(/([&?])eref=[^&]*(?:&|$)/, '$1'); // From cnn.com feeds
  window_href = window_href.replace(/([&?])ref=[^&]*(?:&|$)/, '$1'); // From cbc.ca/news feeds
  window_href = window_href.replace(/([&?])bn=[^&]*(?:&|$)/, '$1'); // From thestar.com links
  window_href = window_href.replace(/([&?])cmpid=[^&]*(?:&|$)/, '$1'); // From theglobeandmail.com links
  window_href = window_href.replace(/([&?])feature=(?:related|embed)/, '$1'); // For YouTube
  
  // If the string ends with the '?' character (no more GET variables left), remove it
  window_href = window_href.replace(/[&?]$/, '');
  
  // If the href has changed, update it
  if (window.location.href != window_href) {
    window.location.href = window_href;
  }
}
{'fraction_non_alphanumeric': 0.24425887265135698, 'fraction_numerical': 0.0038771249627199524, 'mean_word_length': 4.5438016528925615, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3172961', 'n_tokens_mistral': 1179, 'n_tokens_neox': 1163, 'n_words': 230}