<commit_before>/* All code by <NAME> for CSE451 */

function promptAndGetLocation(){
	if ("geolocation" in navigator) {
		$('#output').append('<li>1. Finding current location...</li>');
		navigator.geolocation.getCurrentPosition(function(position) {
			$('#map').html("");// clear the "allow location services" message
			$('#output').append('<li>2. Current location found, displaying map...</li>');
			showCurrentLocation(position.coords.latitude, position.coords.longitude);
		},function(failure) {

		    bootbox.alert("Geolocation error: "+failure.message,function(){
		    	if(failure.message.indexOf("Only secure origins are allowed") == 0) {
			       bootbox.alert("Chrome 50 and newer does not allow geolocation on insecure connection (http) for this project, to view this demo, please use firefox or an older version of Chrome");
			       $('#output').append('<li>Insecure connection error, please use firefox or an older version of Chrome.</li>');
			    }
		    });
		    return;

		  });
	} else {
		// Recursively call the function until the user allows location, or the user has an out of date browser
		bootbox.alert("Please use a modern browser.");
	}

}
<commit_msg>accounting for chrome v 50+ error<commit_after>/* All code by <NAME> for CSE451 */

function promptAndGetLocation(){
	if ("geolocation" in navigator) {
		$('#output').append('<li>1. Finding current location...</li>');
		navigator.geolocation.getCurrentPosition(function(position) {
			$('#map').html("");// clear the "allow location services" message
			$('#output').append('<li>2. Current location found, displaying map...</li>');
			showCurrentLocation(position.coords.latitude, position.coords.longitude);
		},function(failure) {

		    bootbox.alert("Geolocation error: "+failure.message,function(){
		    	if(failure.message.indexOf("Only secure origins are allowed") == 0) {
			       bootbox.alert("Chrome 50 and newer does not allow geolocation on insecure connection (http) for this project, to view this demo, please use firefox or an older version of Chrome");
			       $('#output').append('<li>Insecure connection error, please use firefox or an older version of Chrome.</li>');
			    }
		    });
		    return;
		  });
	} else {
		// Recursively call the function until the user allows location, or the user has an out of date browser
		bootbox.alert("Please use a modern browser.");
	}

}

{'fraction_non_alphanumeric': 0.14106320636249478, 'fraction_numerical': 0.007534533277521975, 'mean_word_length': 3.94824016563147, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '451157', 'n_tokens_mistral': 724, 'n_tokens_neox': 653, 'n_words': 221}