<commit_before>(function rocketbeltProgressIndicators(rb, document) {
  function onClassMutation(mutations) {
    var mutationsLen = mutations && mutations.length ? mutations.length : 0;

    for (var k = 0; k < mutationsLen; k++) {
      var mutation = mutations[k];
      var el = mutation.target;

      if (mutation.target.classList.contains('is-busy')) {
        // If "is-busy" was added, do the decoratin'
		if (mutation.target.getElementsByClassName('is-busy_overlay').length === 0) {
		// Only add overlay if one doesn't already exist
			var dot = '<div class="dot" aria-hidden="true"></div>';
			var a11yAttrs = 'aria-label="Loading." role="alert" aria-live="polite" aria-busy="true"';
			var elType = el.nodeName === 'UL' || el.nodeName === 'OL' ? 'li' : 'div';
			var fragment = '<' + elType + ' class="is-busy_overlay is-busy_overlay-opaque" ' + a11yAttrs + '>' + dot + dot + dot + '</' + elType + '>';

			el.innerHTML = el.innerHTML + fragment;
		}
      } else {
        // If "is-busy" was removed
        var overlay = el.querySelectorAll('.is-busy_overlay')[0];

        if (overlay) {
          overlay.parentNode.removeChild(overlay);
        }
      }
    }
  }

  function observeComponents() {
    var busyable = document.querySelectorAll('.is-busyable');

    if (busyable.length === 0) {
      busyable = document.querySelectorAll('body');
    }

    var busyableLen = busyable.length;

    for (var i = 0; i < busyableLen; i++) {
      var busyableEl = busyable[i];

      // Set an observer to listen for .invalid.
      var observer = new MutationObserver(function (mutations) { onClassMutation(mutations); });
      observer.observe(busyableEl, { subtree: true, attributes: true, attributeOldValue: true, attributeFilter: ['class'] });
    }
  }

  rb.onDocumentReady(observeComponents);
  rb.progressIndicators = rb.progressIndicators || {};
  rb.progressIndicators.observeComponents = observeComponents;
})(window.rb, document);
<commit_msg>Grand Parent elements and higher(?) are removing the class<commit_after>(function rocketbeltProgressIndicators(rb, document) {
  function onClassMutation(mutations) {
    var mutationsLen = mutations && mutations.length ? mutations.length : 0;

    for (var k = 0; k < mutationsLen; k++) {
      var mutation = mutations[k];
      var el = mutation.target;

      if (mutation.target.classList.contains('is-busy')) {
        // If "is-busy" was added, do the decoratin'
		if (mutation.target.getElementsByClassName('is-busy_overlay').length === 0) {
		// Only add overlay if one doesn't already exist
			var dot = '<div class="dot" aria-hidden="true"></div>';
			var a11yAttrs = 'aria-label="Loading." role="alert" aria-live="polite" aria-busy="true"';
			var elType = el.nodeName === 'UL' || el.nodeName === 'OL' ? 'li' : 'div';
			var fragment = '<' + elType + ' class="is-busy_overlay is-busy_overlay-opaque" ' + a11yAttrs + '>' + dot + dot + dot + '</' + elType + '>';

			el.innerHTML = el.innerHTML + fragment;
		}
      } else {
        // If "is-busy" was removed
        var overlay = el.querySelectorAll('.is-busy_overlay')[0];

        if (overlay && !overlay.parentNode.classList.contains('is-busy')) {
		overlay.parentNode.removeChild(overlay);
	}
      }
    }
  }

  function observeComponents() {
    var busyable = document.querySelectorAll('.is-busyable');

    if (busyable.length === 0) {
      busyable = document.querySelectorAll('body');
    }

    var busyableLen = busyable.length;

    for (var i = 0; i < busyableLen; i++) {
      var busyableEl = busyable[i];

      // Set an observer to listen for .invalid.
      var observer = new MutationObserver(function (mutations) { onClassMutation(mutations); });
      observer.observe(busyableEl, { subtree: true, attributes: true, attributeOldValue: true, attributeFilter: ['class'] });
    }
  }

  rb.onDocumentReady(observeComponents);
  rb.progressIndicators = rb.progressIndicators || {};
  rb.progressIndicators.observeComponents = observeComponents;
})(window.rb, document);

{'fraction_non_alphanumeric': 0.1514023330851328, 'fraction_numerical': 0.004964010920824026, 'mean_word_length': 3.370932754880694, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 11, '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': '1090224', 'n_tokens_mistral': 1334, 'n_tokens_neox': 1256, 'n_words': 287}