<commit_before>// animateBro
(function( animateBro, $, undefined ) {

	/*

	Dependencies:
	jQuery
	offsetKitty
	animate.css

	*/

	// Define config var
	animateBro.config;

	// Functions to run on load
	animateBro.load = function(options) {
		// Define default plugin config
		var defaults = {
			'minViewportHeight': 1000,
			'elements': []
		};

		// Update plugin config with options
		animateBro.config = $.extend({}, defaults, options);

		// If we have elements to animate
		if(animateBro.config['elements'].length > 0) {
			// Init animations
			animateBro.init();
		}
	};

	animateBro.init = function() {
		// Only allow on avg height viewports
		if ($(window).height() < animateBro.config['minViewportHeight']) {
			// Loop through elements array
			$.each(animateBro.config['elements'], function (index, value) {
				// Check if element exists on page
				if ($(value['element']).length) {
					// Check if element if below viewport
					if (offsetKitty.viewport(value['hook']).top > $(window).scrollTop()) {
						// Set opacity to 0
						$(value['element']).css({'opacity': 0});
					}
				}
			});
		}
	};

	// Function to run on scroll
	$(window).scroll(function() {
		if(animateBro.config['elements'].length > 0) {
			// Loop through elements array
			$.each(animateBro.config['elements'], function (index, value) {
				// Check if element exists on page
				if ($(value['element']).length) {
					// If hook enters viewport + element is hidden
					if (offsetKitty.viewport(value['hook']).insideViewport && $(value['element']).css('opacity') == 0) {
						// Add animateBro.css effect classes
						$(value['element']).addClass('animated ' + value['effect']);
					}
				}<commit_msg>Bugfixes and improvements in jquery.animateBro.js<commit_after>// animateBro
(function( animateBro, $, undefined ) {

	/*

	Dependencies:
	jQuery
	offsetKitty
	animate.css

	*/

	// Define config var
	animateBro.config;

	// Functions to run on load
	animateBro.load = function(options) {
		// Define default plugin config
		var defaults = {
			'minViewportHeight': 768,
			'maxViewportHeight': 1440,
			'elements': []
		};

		// Update plugin config with options
		animateBro.config = $.extend({}, defaults, options);

		// If we have elements to animate
		if(animateBro.config['elements'].length > 0) {
			// Init animations
			animateBro.init();
		}
	};

	animateBro.init = function() {
		// Only allow on specified viewports
		if (
			$(window).height() >= animateBro.config['minViewportHeight'] &&
			$(window).height() < animateBro.config['maxViewportHeight']
		) {
			// Loop through elements array
			$.each(animateBro.config['elements'], function (index, value) {
				// Check if element exists on page
				if ($(value['element']).length) {
					// Check if element if below viewport
					if (offsetKitty.viewport(value['hook']).top > $(window).scrollTop()) {
						// Set opacity to 0
						$(value['element']).css({'opacity': 0});
					}
				}
			});
		}
	};

	// Function to run on scroll
	$(window).scroll(function() {
		if(animateBro.config['elements'].length > 0) {
			// Loop through elements array
			$.each(animateBro.config['elements'], function (index, value) {
				// Check if element exists on page
				if ($(value['element']).length) {
					// If hook enters viewport + element is hidden
					if (offsetKitty.viewport(value['hook']).insideViewport && $(value['element']).css('opacity') == 0) {
						// Add animateBro.css effect classes
						$(value['element']).addClass('animated ' + value['effect']);
						// Remove opacity 0 style
						$(value['element']).css({'opacity': ''});
					}
				}
{'fraction_non_alphanumeric': 0.1632596685082873, 'fraction_numerical': 0.0060773480662983425, 'mean_word_length': 3.1958285052143687, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 10, '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': '7207838', 'n_tokens_mistral': 1353, 'n_tokens_neox': 1060, 'n_words': 276}