<commit_before>/*!
 * jQuery imagesLoaded plugin v1.0.1
 * http://github.com/desandro/imagesloaded
 *
 * MIT License
 * Original author: <NAME>
 * Contributors: <NAME>, <NAME>
 *   <NAME>, <NAME>, <NAME>
 */

// $('#my-container').imagesLoaded(myFunction)
// execute a callback when all images have loaded.
// needed because .load() doesn't work on cached images

// callback function gets image collection as argument
//  `this` is the container

(function($, undefined) {
  $.fn.imagesLoaded = function( callback ) {
    var $images = this.find('img'),
        len = $images.length,
        _this = this,
        blank = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==';

    function triggerCallback() {
      callback.call( _this, $images );
    }

    function imgLoaded() {
      if ( --len <= 0 && this.src !== blank ){
        setTimeout( triggerCallback );
        $images.unbind( 'load error', imgLoaded );
      }
    }

    if ( !len ) {
      triggerCallback();
    }

    $images.bind( 'load error',  imgLoaded ).each( function() {
      // cached images don't fire load sometimes, so we reset src.
      if (this.complete || this.complete === undefined){
        var src = this.src;
        // webkit hack from http://groups.google.com/group/jquery-dev/browse_thread/thread/eee6ab7b2da50e1f
        // data uri bypasses webkit log warning (thx doug jones)
        this.src = blank;
        this.src = src;
      }
    });

    return this;
  };
})(jQuery);<commit_msg>Rename `_this` into `$this` for consistency with `$images`. Also, use `$this` instead of the `this` keyword where possible, for better minification.<commit_after>/*!
 * jQuery imagesLoaded plugin v1.0.1
 * http://github.com/desandro/imagesloaded
 *
 * MIT License
 * Original author: <NAME>
 * Contributors: <NAME>, <NAME>
 *   <NAME>, <NAME>, <NAME>
 */

// $('#my-container').imagesLoaded(myFunction)
// execute a callback when all images have loaded.
// needed because .load() doesn't work on cached images

// callback function gets image collection as argument
//  `this` is the container

(function($, undefined) {
  $.fn.imagesLoaded = function( callback ) {
    var $this = this,
        $images = $this.find('img'),
        len = $images.length,
        blank = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==';

    function triggerCallback() {
      callback.call( $this, $images );
    }

    function imgLoaded() {
      if ( --len <= 0 && this.src !== blank ){
        setTimeout( triggerCallback );
        $images.unbind( 'load error', imgLoaded );
      }
    }

    if ( !len ) {
      triggerCallback();
    }

    $images.bind( 'load error',  imgLoaded ).each( function() {
      // cached images don't fire load sometimes, so we reset src.
      if (this.complete || this.complete === undefined){
        var src = this.src;
        // webkit hack from http://groups.google.com/group/jquery-dev/browse_thread/thread/eee6ab7b2da50e1f
        // data uri bypasses webkit log warning (thx doug jones)
        this.src = blank;
        this.src = src;
      }
    });

    return $this;
  };
})(jQuery);
{'fraction_non_alphanumeric': 0.14566804189146304, 'fraction_numerical': 0.008251348778165662, 'mean_word_length': 2.669383003492433, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, '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': '1965051', 'n_tokens_mistral': 995, 'n_tokens_neox': 966, 'n_words': 265}