<commit_before>var App = {
	init: function() {
		var $statusBtn = $("#submit");
		$statusBtn.click(this.checkStatus);

		this.compileTemplates();

	},
	api_path: "https://community-haveibeenpwned.p.mashape.com/breachedaccount/",
	api_token: "<KEY>",
	checkStatus: function(event){
		event.preventDefault();
		var email = $("#email").val();

		email = encodeURIComponent(email);

		$.ajax({
			type: 'GET',
			url: App.api_path + email,
			success: App.renderResponse,
			beforeSend: function(request) {
				request.setRequestHeader("X-Mashape-Key", App.api_token);
			}

		});
	},
	renderResponse: function(data) {
		var site;
		var $listing = $("#result");
		var ul;
		var listings = [];

		for (var index in data) {
			site = data[index];

			var listing = App.renderTemplate("listing", site);
			listings.push(listing);
		}
		ul = App.renderTemplate("breach-results", {listings: listings});
		$listing.append(ul);
	},

	compileTemplates: function() {
		$("script[type='text/x-handlebars-template']").each(function(index, template){
			var templateName = template.id;
			var source = $("#" + templateName).html();
			App.templates[templateName] = Handlebars.compile(source);
		});
	},
	templates: [],
	renderTemplate: function(template, context) {
		return this.templates[template](context);
	}
};

$(document).ready(function(){<commit_msg>Format js file to make it look cleaner<commit_after>var App = {
	init: function() {
		var $statusBtn = $("#submit");
		$statusBtn.click(this.checkStatus);

		this.compileTemplates();

	},
	
	api_path: "https://community-haveibeenpwned.p.mashape.com/breachedaccount/",
	api_token: "<KEY>",
	
	checkStatus: function(event){
		event.preventDefault();
		var email = $("#email").val();

		email = encodeURIComponent(email);

		$.ajax({
			type: 'GET',
			url: App.api_path + email,
			success: App.renderResponse,
			beforeSend: function(request) {
				request.setRequestHeader("X-Mashape-Key", App.api_token);
			}

		});
	},
	
	renderResponse: function(data) {
		var site;
		var $listing = $("#result");
		var ul;
		var listings = [];

		for (var index in data) {
			site = data[index];

			var listing = App.renderTemplate("listing", site);
			listings.push(listing);
		}
		ul = App.renderTemplate("breach-results", {listings: listings});
		$listing.append(ul);
	},

	compileTemplates: function() {
		$("script[type='text/x-handlebars-template']").each(function(index, template){
			var templateName = template.id;
			var source = $("#" + templateName).html();
			App.templates[templateName] = Handlebars.compile(source);
		});
	},

	templates: [],
	
	renderTemplate: function(template, context) {
		return this.templates[template](context);
	}
};

$(document).ready(function(){
{'fraction_non_alphanumeric': 0.1780721118469463, 'fraction_numerical': 0.0, 'mean_word_length': 4.3629191321499015, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1493790', 'n_tokens_mistral': 1008, 'n_tokens_neox': 885, 'n_words': 166}