<commit_before>import { HtmlDestroyer } from "./html-destroyer";

var htmlDestroyer:HtmlDestroyer = new HtmlDestroyer();

chrome.runtime.onMessage.addListener(
  function(request, sender, sendResponse) {
    if (request == "destroyH")
    {
      destroyH();      
      sendResponse("destroyH");
    }
    else if (request == "destroyImg")
    {
      destroyH();      
      sendResponse("destroyImg");
    }
  });

function destroyH() {  
      $(document).ready(function() {
        $("h1,h2,h3,h4,h5,h6").each(function() {
          var element = $(this);
          var destroyElement = function() {
              htmlDestroyer.destroyH(element);
              $(window).trigger("resize");
              setTimeout(destroyElement, Math.random() * 100 + 50);
          };
          destroyElement();
        });        
      });
}

function destroyImg() {
      $(document).ready(function() {
        $("img").each(function() {
          var element = $(this);
          var destroyElement = function() {
              htmlDestroyer.destroyImg(element);
              $(window).trigger("resize");
          };
          var intervalId = setInterval(destroyElement, 200);
        });        
      });
}<commit_msg>Destroy Img breaks and fixes the img source<commit_after>import { HtmlDestroyer } from "./html-destroyer";

var htmlDestroyer:HtmlDestroyer = new HtmlDestroyer();

chrome.runtime.onMessage.addListener(
  function(request, sender, sendResponse) {
    if (request == "destroyH")
    {
      destroyH();      
      sendResponse("destroyH");
    }
    else if (request == "destroyImg")
    {
      destroyImg();      
      sendResponse("destroyImg");
    }
  });

function destroyH() {  
      $(document).ready(function() {
        $("h1,h2,h3,h4,h5,h6").each(function() {
          var element = $(this);
          var destroyElement = function() {
              htmlDestroyer.destroyH(element);
              $(window).trigger("resize");
              setTimeout(destroyElement, Math.random() * 100 + 50);
          };
          destroyElement();
        });        
      });
}

function destroyImg() {
      $(document).ready(function() {
        $("img").each(function() {
          var element = $(this);
          flipAttributesCycle(element, "src", "data-src")
        });        
      });
}

function destroyHopeOfBeingAnOnlyChild() {
  const onlyChildPs = $('p').filter(function () {
    return ($(this).siblings('p').length > 0);
  });


}

function destroyChangesOfNeverGettingType2Diabetes() {

}

function flipAttributesCycle(element:JQuery, attributeFrom:string, attributeTo:string) {
  element.attr(attributeTo, element.attr(attributeFrom));
  element.attr(attributeFrom, "");
  $(window).trigger("resize");
  setTimeout(function(){
    flipAttributesCycle(element, attributeTo, attributeFrom);
  }, Math.random() * 200 + 50);
}
{'fraction_non_alphanumeric': 0.1547327977645826, 'fraction_numerical': 0.011177086971707998, 'mean_word_length': 2.5055079559363524, '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': '559257', 'n_tokens_mistral': 833, 'n_tokens_neox': 808, 'n_words': 138}