<commit_before>
$(document).ready(function() {
	if (window.File && window.FileReader && window.FileList && window.Blob) {
		fillData();
		loadMainPage();
		checkLogin();
		loadRecommended();

	} else {
	  alert('The File APIs are not fully supported in this browser.');
	}
})

function hideFilter() {
	var filter = document.getElementById("filterContainer");
	if (filter.className != "HiddenClass") {
		filter.className = "HiddenClass";
	} else {
		filter.className = "";
	}
}

function loadRecommended() {
	var recommended = document.getElementById("recommended");
	var html = '';
		for (var item = 0; item < 5; item++) {
		html += '<div class=\"RecommendedPlaceholder\">\r\n' +
				'</div>\r\n';
		}
	recommended.innerHTML = html;
	$.getJSON("/recommend", function (jsonObj) {
		var recStock = jsonObj["stocks"];
		var html = '';
		for (var item in recStock) {
		html += '<div class=\"RecommendedPlaceholder\">\r\n' +
				'<div class=\"RecSymbol\">' + recStock[item] +
				'</div>\r\n</div>\r\n';
		}
		recommended.innerHTML = html;
	});
}

function checkLogin() {
	var login = document.getElementById("logCond");
	var cookie = document.cookie;
	if (cookie.indexOf("stock_auth_token=") !== -1) {
		var cookieValue = cookie.indexOf(cookie.indexOf("stock_auth_token="));
		if (cookieValue !== -1) {
			login.innerHTML = '<a href="javascript:logout();">LOGOUT</a>'
		} else {
			login.innerHTML = '<a href="/login.html">LOGIN</a>';
		}
	} else {
		login.innerHTML = '<a href="/login.html">LOGIN</a>';
	}
}

function logout() {
	document.cookie = 'stock_auth_token=; expires=Thu, 01 Jan 1970 00:00:01 GMT;';
	window.location.replace("/main_page.html");
}

var updateTime = 10 * 1000
var updateInterval = setInterval(fillData, updateTime)
var currentPage = 0;<commit_msg>added click to recommended<commit_after>
$(document).ready(function() {
	if (window.File && window.FileReader && window.FileList && window.Blob) {
		fillData();
		loadMainPage();
		checkLogin();
		loadRecommended();

	} else {
	  alert('The File APIs are not fully supported in this browser.');
	}
})

function hideFilter() {
	var filter = document.getElementById("filterContainer");
	if (filter.className != "HiddenClass") {
		filter.className = "HiddenClass";
	} else {
		filter.className = "";
	}
}

function loadRecommended() {
	var recommended = document.getElementById("recommended");
	var html = '';
		for (var item = 0; item < 5; item++) {
		html += '<div class=\"RecommendedPlaceholder\">\r\n' +
				'</div>\r\n';
		}
	recommended.innerHTML = html;
	$.getJSON("/recommend", function (jsonObj) {
		var recStock = jsonObj["stocks"];
		var html = '';
		for (var item in recStock) {
		html += '<div class=\"RecommendedPlaceholder\"' +
				' onclick=\"loadIndividual(\'' + recStock[item] + '\')\">\r\n' +
				'<div class=\"RecSymbol\">' + recStock[item] +
				'</div>\r\n</div>\r\n';
		}
		recommended.innerHTML = html;
	});
}

function checkLogin() {
	var login = document.getElementById("logCond");
	var cookie = document.cookie;
	if (cookie.indexOf("stock_auth_token=") !== -1) {
		var cookieValue = cookie.indexOf(cookie.indexOf("stock_auth_token="));
		if (cookieValue !== -1) {
			login.innerHTML = '<a href="javascript:logout();">LOGOUT</a>'
		} else {
			login.innerHTML = '<a href="/login.html">LOGIN</a>';
		}
	} else {
		login.innerHTML = '<a href="/login.html">LOGIN</a>';
	}
}

function logout() {
	document.cookie = 'stock_auth_token=; expires=Thu, 01 Jan 1970 00:00:01 GMT;';
	window.location.replace("/main_page.html");
}

var updateTime = 10 * 1000
var updateInterval = setInterval(fillData, updateTime)
var currentPage = 0;
{'fraction_non_alphanumeric': 0.18765568779407693, 'fraction_numerical': 0.012731801826736784, 'mean_word_length': 4.230101302460203, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 27, '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': '1856069', 'n_tokens_mistral': 1333, 'n_tokens_neox': 1195, 'n_words': 257}