<commit_before>chrome.extension.sendMessage({}, function(response) {
  var readyStateCheckInterval = setInterval(function() {
    if (document.readyState === "complete") {
      clearInterval(readyStateCheckInterval);

      var colorMapping = {
        'blocked': 'rgb(199, 37, 67)',
        'needs ': 'rgb(199, 37, 67)'
      };

      function colorLabelNodes(labels) {
        Object.keys(colorMapping).forEach(function(labelKeyword) {
          Array.prototype.filter.call(labels, function(label) {
            return label.textContent.indexOf(labelKeyword) === 0
          }).forEach(function(label) {
            label.style.color = colorMapping[labelKeyword];
          });
        });
      }

      var observer = new MutationObserver(function (mutations) {
        mutations.forEach(function (mutation) {
          Array.prototype.forEach.call(mutation.addedNodes, function(addedNode) {
            if (typeof addedNode.getElementsByClassName !== 'undefined') {
              var previews = addedNode.getElementsByClassName('preview');
              if (previews.length === 0) { return; }

              var labels = Array.prototype.filter.call(previews, function(preview) {
                return preview.getElementsByClassName !== 'undefined';
              }).map(function(preview) {
                return Array.prototype.slice.call(preview.getElementsByClassName('label'));<commit_msg>Use substrings rather than prefixes<commit_after>chrome.extension.sendMessage({}, function(response) {
  var readyStateCheckInterval = setInterval(function() {
    if (document.readyState === "complete") {
      clearInterval(readyStateCheckInterval);

      var colorMapping = {
        'blocked': 'rgb(199, 37, 67)',
        'needs ': 'rgb(199, 37, 67)'
      };

      function colorLabelNodes(labels) {
        Object.keys(colorMapping).forEach(function(labelKeyword) {
          Array.prototype.filter.call(labels, function(label) {
            return label.textContent.indexOf(labelKeyword) >= 0;
          }).forEach(function(label) {
            label.style.color = colorMapping[labelKeyword];
          });
        });
      }

      var observer = new MutationObserver(function (mutations) {
        mutations.forEach(function (mutation) {
          Array.prototype.forEach.call(mutation.addedNodes, function(addedNode) {
            if (typeof addedNode.getElementsByClassName !== 'undefined') {
              var previews = addedNode.getElementsByClassName('preview');
              if (previews.length === 0) { return; }

              var labels = Array.prototype.filter.call(previews, function(preview) {
                return preview.getElementsByClassName !== 'undefined';
              }).map(function(preview) {
                return Array.prototype.slice.call(preview.getElementsByClassName('label'));
{'fraction_non_alphanumeric': 0.12464589235127478, 'fraction_numerical': 0.0113314447592068, 'mean_word_length': 2.781793842034806, 'pattern_counts': {'":': 0, '<': 3, '<?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': '2717617', 'n_tokens_mistral': 756, 'n_tokens_neox': 717, 'n_words': 123}