<commit_before>
$(document).ready(function() {
	var $fileIn = $("#fileInput");
	$fileIn.bind("change", loadFile);

	var $gotoBox = $("#gotoBox");
	$gotoBox.bind("keypress", searchTable);

});

function loadFile(evt) {
	evt = evt.originalEvent || evt;
	var file = evt.target.files[0];
	if(file != null) {
		openFile(file);
	}
}
<commit_msg>Added check for file API<commit_after>
$(document).ready(function() {
	var $fileIn = $("#fileInput");
	var $gotoBox = $("#gotoBox");
	if(supportsFileAPI()) {
		$fileIn.bind("change", loadFile);
		$gotoBox.bind("keypress", searchTable);
	}
	else {
		$("#container").html(
			"<h2>Your browser does not support the HTML5 File API</h2>" +
			"<div style='text-align: center'>This application makes use of the HTML5 File API to read local files.<br />" +
			"Please update your browser</div>"
		);
		$("#inputSection").remove();
	}


});

/**
 * Function that returns true if the user's web browser supports the HTML5 File API
 * @returns {boolean}
 */
function supportsFileAPI() {
	return window.File && window.FileReader && window.FileList && window.Blob;
}

function loadFile(evt) {
	evt = evt.originalEvent || evt;
	var file = evt.target.files[0];
	if(file != null) {
		openFile(file);
	}
}

{'fraction_non_alphanumeric': 0.18292682926829268, 'fraction_numerical': 0.005691056910569106, 'mean_word_length': 4.495535714285714, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, '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': '1172889', 'n_tokens_mistral': 431, 'n_tokens_neox': 426, 'n_words': 105}