<commit_before>/*!
 * Plugin for skrollr.
 * This plugin brings opacity and hsl colors to IE < 9.
 *
 * <NAME> - https://github.com/Prinzhorn/skrollr
 *
 * Free to use under terms of MIT license
 */
(function(document, skrollr) {
	'use strict';

	var rxHSLAColor = /hsla?\(\s*(-?[\d.]+)\s*,\s*(-?[\d.]+)%\s*,\s*(-?[\d.]+)%.*?\)/g;
	var rxRGBAColor = /rgba?\(\s*(-?[\d.]+%?)\s*,\s*(-?[\d.]+%?)\s*,\s*(-?[\d.]+%?).*?\)/g;
	var rxID = /^#[^\s]+$/;

	var _setStyle = skrollr.setStyle;

	//Monkeypatch the setStyle function.
	skrollr.setStyle = function(el, prop, val) {
		//Original function call.
		_setStyle.apply(this, arguments);

		var style = el.style;
		var matched;

		//IE opacity
		if(prop === 'opacity') {
			style.zoom = 1;

			//Remove filter attribute in IE.
			if(val === 1 && style.removeAttribute) {
				style.removeAttribute('filter');
			} else {
				style.filter = 'alpha(opacity=' + val * 100 + ')';
			}

			return;
		}

		//Fast pre check
		if(val.indexOf('hsl') > -1) {
			matched = false;

			//Replace hsl(a) with hex if needed (ignoring alpha).
			val = val.replace(rxHSLAColor, function(x, h, s, l) {
				matched = true;

				return toHex.hsl(parseFloat(h), parseFloat(s), parseFloat(l));
			});

			if(matched) {
				try {
					style[prop] = val;
				} catch(ignore) {}

				return;
			}
		}

		//Fast pre check
		if(val.indexOf('rgb') > -1) {
			matched = false;<commit_msg>remove the filter when opacity reached 1. fixes #4<commit_after>/*!
 * Plugin for skrollr.
 * This plugin brings opacity and hsl colors to IE < 9.
 *
 * <NAME> - https://github.com/Prinzhorn/skrollr
 *
 * Free to use under terms of MIT license
 */
(function(document, skrollr) {
	'use strict';

	var rxHSLAColor = /hsla?\(\s*(-?[\d.]+)\s*,\s*(-?[\d.]+)%\s*,\s*(-?[\d.]+)%.*?\)/g;
	var rxRGBAColor = /rgba?\(\s*(-?[\d.]+%?)\s*,\s*(-?[\d.]+%?)\s*,\s*(-?[\d.]+%?).*?\)/g;
	var rxID = /^#[^\s]+$/;

	var _setStyle = skrollr.setStyle;

	//Monkeypatch the setStyle function.
	skrollr.setStyle = function(el, prop, val) {
		//Original function call.
		_setStyle.apply(this, arguments);

		var style = el.style;
		var matched;

		//IE opacity
		if(prop === 'opacity') {
			style.zoom = 1;

			//Remove filter attribute in IE.
			if(val >= 1 && style.removeAttribute) {
				style.removeAttribute('filter');
			} else {
				style.filter = 'alpha(opacity=' + val * 100 + ')';
			}

			return;
		}

		//Fast pre check
		if(val.indexOf('hsl') > -1) {
			matched = false;

			//Replace hsl(a) with hex if needed (ignoring alpha).
			val = val.replace(rxHSLAColor, function(x, h, s, l) {
				matched = true;

				return toHex.hsl(parseFloat(h), parseFloat(s), parseFloat(l));
			});

			if(matched) {
				try {
					style[prop] = val;
				} catch(ignore) {}

				return;
			}
		}

		//Fast pre check
		if(val.indexOf('rgb') > -1) {
			matched = false;
{'fraction_non_alphanumeric': 0.21755994358251057, 'fraction_numerical': 0.006346967559943582, 'mean_word_length': 2.752645502645503, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 10, 'https://': 2, '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': '6135647', 'n_tokens_mistral': 1279, 'n_tokens_neox': 1089, 'n_words': 245}