<commit_before>﻿if (!Element.prototype.contains)
{
  Element.prototype.contains = function(ele)
  {
    while (ele && ele != this)
      ele = ele.parentNode;
    return Boolean(ele);
  }
}

if (!Element.prototype.insertAdjacentHTML)
{
  Element.prototype.insertAdjacentHTML = function(position, markup)
  {
    if (position == 'beforeend')
    {
      var div = this.appendChild(document.createElement('div'));
      div.innerHTML = markup;
      var range = document.createRange();
      range.selectNodeContents(div);
      this.replaceChild(range.extractContents(), div);
      return this.firstElementChild;
    }
  }
}

if (!document.createElement('div').classList)
{
  Element.prototype.__defineGetter__('classList', function()
  {
    return this.className.split(/\s+/);
  });
  Element.prototype.__defineSetter__('classList', function(){});
}

/**
 * @fileoverview
 * Helper function prototypes related to DOM objects and the DOM
 * <strong>fixme: Christian should document the template syntax</strong><commit_msg>Remove classList polyfill.<commit_after>﻿if (!Element.prototype.contains)
{
  Element.prototype.contains = function(ele)
  {
    while (ele && ele != this)
      ele = ele.parentNode;
    return Boolean(ele);
  }
}

if (!Element.prototype.insertAdjacentHTML)
{
  Element.prototype.insertAdjacentHTML = function(position, markup)
  {
    if (position == 'beforeend')
    {
      var div = this.appendChild(document.createElement('div'));
      div.innerHTML = markup;
      var range = document.createRange();
      range.selectNodeContents(div);
      this.replaceChild(range.extractContents(), div);
      return this.firstElementChild;
    }
  }
}

/**
 * @fileoverview
 * Helper function prototypes related to DOM objects and the DOM
 * <strong>fixme: Christian should document the template syntax</strong>
{'fraction_non_alphanumeric': 0.13155021834061134, 'fraction_numerical': 0.0, 'mean_word_length': 3.798429319371728, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '3800572', 'n_tokens_mistral': 532, 'n_tokens_neox': 527, 'n_words': 111}