<commit_before>// Scans your stylesheet for pseudo classes and adds a class with the same name.
// Thanks to Knyle Style Sheets for the idea.
(function () {

'use strict';

var toArray = function(arr) {
  return Array.prototype.slice.call(arr, 0);
};

var add = function(a, b) { return a + b; };

// Compile regular expression.
var pseudos = ['link', 'visited', 'hover', 'active', 'focus', 'target', 'enabled', 'disabled', 'checked'];
var pseudoRe = new RegExp(":((" + pseudos.join(")|(") + "))", "gi");
var processedPseudoClasses = toArray(document.styleSheets).filter(function(ss) {
  return !(ss.href != null);
}).map(function(ss) {
  return toArray(ss.cssRules).filter(function(rule) {
    // Keep only rules with pseudo classes.
    return rule.selectorText && rule.selectorText.match(pseudoRe);
  }).map(function(rule) {
    // Replace : with . and encoded :
    return rule.cssText.replace(pseudoRe, ".\\3A $1");
  }).reduce(add);
}).reduce(add, '');
if (processedPseudoClasses.length) {
  // Add a new style element with the processed pseudo class styles.
  return $('head').append($('<style />').text(processedPseudoClasses));
}

}());<commit_msg>Remove bonzo and qwery dependencies<commit_after>// Scans your stylesheet for pseudo classes and adds a class with the same name.
// Thanks to Knyle Style Sheets for the idea.
(function () {

'use strict';

var toArray = function(arr) { return Array.prototype.slice.call(arr, 0); };
var add = function(a, b) { return a + b; };

// Compile regular expression.
var pseudos = [ 'link', 'visited', 'hover', 'active', 'focus', 'target',
                'enabled', 'disabled', 'checked' ];
var pseudoRe = new RegExp(":((" + pseudos.join(")|(") + "))", "gi");
var processedPseudoClasses = toArray(document.styleSheets).filter(function(ss) {
  return !(ss.href != null);
}).map(function(ss) {
  return toArray(ss.cssRules).filter(function(rule) {
    // Keep only rules with pseudo classes.
    return rule.selectorText && rule.selectorText.match(pseudoRe);
  }).map(function(rule) {
    // Replace : with . and encoded :
    return rule.cssText.replace(pseudoRe, ".\\3A $1");
  }).reduce(add);
}).reduce(add, '');
if (processedPseudoClasses.length) {
  // Add a new style element with the processed pseudo class styles.
  var styleEl = document.createElement('style');
  styleEl.innerText = processedPseudoClasses;
  return document.querySelectorAll('head')[0].appendChild(styleEl);
}

}());
{'fraction_non_alphanumeric': 0.17336065573770493, 'fraction_numerical': 0.0028688524590163933, 'mean_word_length': 4.318082788671024, 'pattern_counts': {'":': 2, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, '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': '7007567', 'n_tokens_mistral': 763, 'n_tokens_neox': 754, 'n_words': 216}