<commit_before>/*
 * Hisrc jQuery Plugin
 *
 * Copyright (c) 2011 "@1marc" <NAME>
 * Licensed under the MIT license.
 * 
 */

(function($){
	$.hisrc = {
		els: $(),
		init: false
	}
	
	$.hisrc.defaults = {
		// change minimum width, if you wish
		minwidth: 640
	}
	
	$.fn.hisrc = function(options) {
		var settings = $.extend({}, $.hisrc.defaults, options);
	
		var connection = navigator.connection || { type: 0 }; 
	 	return connection.type == 3 // connection.CELL_2G 
			|| connection.type == 4 // connection.CELL_3G
			|| /^[23]g$/.test(connection.type); // string value in new spec
	
		
		$.hisrc.els = $.hisrc.els.add(this);
		
		if (!$.hisrc.init) {
			$(window).on('resize.hisrc', function(){
				$.hisrc.els.trigger('swapres.hisrc');
			});
		}
		
		return this.each(function(){
			$(this).data('lowsrc', $(this).attr('src'));<commit_msg>updated bandwidth test<commit_after>/*
 * Hisrc jQuery Plugin
 *
 * Copyright (c) 2011 "@1marc" <NAME>
 * Licensed under the MIT license.
 * 
 */

(function($){
	$.hisrc = {
		els: $(),
		init: false
	}
	
	$.hisrc.defaults = {
		// change minimum width, if you wish
		minwidth: 640
	}
	
	$.fn.hisrc = function(options) {
		var settings = $.extend({}, $.hisrc.defaults, options);
	
		// bandwidth test sourced from Modernizr
		var connection = navigator.connection || { type: 0 }; 
	 	return connection.type == 3 // connection.CELL_2G 
			|| connection.type == 4 // connection.CELL_3G
			|| /^[23]g$/.test(connection.type); // string value in new spec
	
		
		$.hisrc.els = $.hisrc.els.add(this);
		
		if (!$.hisrc.init) {
			$(window).on('resize.hisrc', function(){
				$.hisrc.els.trigger('swapres.hisrc');
			});
		}
		
		return this.each(function(){
			$(this).data('lowsrc', $(this).attr('src'));
{'fraction_non_alphanumeric': 0.1958762886597938, 'fraction_numerical': 0.01718213058419244, 'mean_word_length': 2.979498861047836, 'pattern_counts': {'":': 0, '<': 5, '<?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': '6447917', 'n_tokens_mistral': 711, 'n_tokens_neox': 598, 'n_words': 134}