<commit_before>(function($) {
	var properties = [
		"name",
		"iteration-count",
		"duration",
		"timing-function",
		"delay",
		"direction"
	], defaults = {
		"name" : "fade",
		"iteration-count" : 1,
		"duration" : "3s",
		"timing-function" : "ease",
		"delay" : "0s",
		"direction" : "normal"
	};

	function MessageDialog($el) {
		function durationToMillis(value) {
			var idx1 = value.indexOf("ms"),
				idx2 = value.indexOf("s");
			if (idx1 != -1) {
				value = value.substring(0, value.length - 2);
				return parseInt(value);
			} else if (idx2 != -1) {
				value = value.substring(0, value.length - 1);
			}
			return parseInt(value) * 1000;

		}
		function show(options) {
			if (shown) {
				queue.push(options);
				return;
			}
			shown = true;
			var params = {},
				msg = options.message;
			for (var i=0; i<properties.length; i++) {
				var name = properties[i],
					value = null;
				if (options[name]) {
					value = options[name];
				} else if (initials[name]) {
					value = initials[name];
				} else {
					value = defaults[name];
				}
				params["animation-" + name] = value;
				params["-webkit-animation-" + name] = value;
			}
			if (msg) {
				$el.find(".message").text(msg);
			}
			$el.css(params);
			$el.show();
			setTimeout(function() {
				$el.hide();
				if (initialText) {
					$el.find(".message").text(initialText);
				}
				shown = false;
				if (queue.length > 0) {
					var next = queue.shift();
					setTimeout(function() {
						show(next);
					}, 10);
				}
			}, durationToMillis(params["animation-duration"]));
		}
		var initials = {},
			initialText = $el.find(".message").text(),
			shown = false,
			queue = [];
		for (var i=0; i<properties.length; i++) {
			var name = properties[i],
				value = $el.css("animation-" + name);
			if (value && value !== "none" && value !== "0s") {
				initials[name] = value;
			}
		}
		$.extend(this, {
		  "show" : show
		})
	}

	$.fn.animateDialog = function(msg, options) {
		if (this.length == 0) {
			return;
		}
		if (typeof(msg) === "object") {
			options = msg;
			msg = null;
		}
		if (!options) {
			options = {};
		}
		if (msg) {
			options.message = msg;
		}
		var dlg = $.data(this[0], "animateDialog");
		if (!dlg) {
			dlg = new MessageDialog(this);
			$.data(this[0], "animateDialog", dlg);
		}
		dlg.show(options);
	}
})(jQuery);<commit_msg>Bugfix for FireFox<commit_after>(function($) {
	var properties = [
		"name",
		"iteration-count",
		"duration",
		"timing-function",
		"delay",
		"direction"
	], defaults = {
		"name" : "fade",
		"iteration-count" : 1,
		"duration" : "3s",
		"timing-function" : "ease",
		"delay" : "0s",
		"direction" : "normal"
	};

	function MessageDialog($el) {
		function durationToMillis(value) {
			var idx1 = value.indexOf("ms"),
				idx2 = value.indexOf("s");
			if (idx1 != -1) {
				value = value.substring(0, value.length - 2);
				return parseInt(value);
			} else if (idx2 != -1) {
				value = value.substring(0, value.length - 1);
			}
			return parseInt(value) * 1000;

		}
		function show(options) {
			if (shown) {
				queue.push(options);
				return;
			}
			shown = true;
			var params = {},
				msg = options.message;
			for (var i=0; i<properties.length; i++) {
				var name = properties[i],
					value = null;
				if (options[name]) {
					value = options[name];
				} else if (initials[name]) {
					value = initials[name];
				} else {
					value = defaults[name];
				}
				params["animation-" + name] = value;
				params["-webkit-animation-" + name] = value;
			}
			if (msg) {
				$el.find(".message").text(msg);
			}
			$el.css(params);
			$el.show();
			setTimeout(function() {
				$el.hide();
				$el.css("animation-name", "");
				$el.css("-webkit-animation-name", "");
				if (initialText) {
					$el.find(".message").text(initialText);
				}
				shown = false;
				if (queue.length > 0) {
					var next = queue.shift();
					setTimeout(function() {
						show(next);
					}, 10);
				}
			}, durationToMillis(params["animation-duration"]));
		}
		var initials = {},
			initialText = $el.find(".message").text(),
			shown = false,
			queue = [];
		for (var i=0; i<properties.length; i++) {
			var name = properties[i],
				value = $el.css("animation-" + name);
			if (value && value !== "none" && value !== "0s") {
				initials[name] = value;
			}
		}
		$.extend(this, {
		  "show" : show
		})
	}

	$.fn.animateDialog = function(msg, options) {
		if (this.length == 0) {
			return;
		}
		if (typeof(msg) === "object") {
			options = msg;
			msg = null;
		}
		if (!options) {
			options = {};
		}
		if (msg) {
			options.message = msg;
		}
		var dlg = $.data(this[0], "animateDialog");
		if (!dlg) {
			dlg = new MessageDialog(this);
			$.data(this[0], "animateDialog", dlg);
		}
		dlg.show(options);
	}
})(jQuery);
{'fraction_non_alphanumeric': 0.199288256227758, 'fraction_numerical': 0.01088549298723048, 'mean_word_length': 2.6613026819923373, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, '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': '1645270', 'n_tokens_mistral': 2198, 'n_tokens_neox': 1743, 'n_words': 357}