<commit_before>/**
* used to display comment and ask pages
*/
HN.displayComments = function(){
	var storyId = window.location.href.match(/\d+\/?$/);
	if(storyId){
		var storyUrl = 'https://hacker-news.firebaseio.com/v0/item/' + storyId[0] + '.json';
	}
	else{
		console.log("No story id found");
		return;
	}
	HN.getJSON(storyUrl, function(storyInfo){
			if(!storyInfo){
				console.log('No info about the story returned');
				return;
			}
			var story = new HN.Story(storyInfo);
			var title_class = 'container'
			var text = story.text();
			var title = '';
			if(text){
				text = "<h6>" + story.author() + "</h6><article>" + HN.util.smartenQuotesHTML(story.text())  + "</article>";
				if(HN.pageName === 'ask' || story.title().match(/^(Ask|Tell) HN:/)){
					title_class += ' ask';
					title = HN.util.getAskStoryTitle(story);<commit_msg>Create function to clear comments from page<commit_after>/**
* used to display comment and ask pages
*/
HN.clearComments = function(){
	document.getElementById('content_main').innerHTML = '';
};

HN.displayComments = function(){
	var storyId = window.location.href.match(/\d+\/?$/);
	if(storyId){
		var storyUrl = 'https://hacker-news.firebaseio.com/v0/item/' + storyId[0] + '.json';
	}
	else{
		console.log("No story id found");
		return;
	}
	HN.getJSON(storyUrl, function(storyInfo){
			if(!storyInfo){
				console.log('No info about the story returned');
				return;
			}
			var story = new HN.Story(storyInfo);
			var title_class = 'container'
			var text = story.text();
			var title = '';
			if(text){
				text = "<h6>" + story.author() + "</h6><article>" + HN.util.smartenQuotesHTML(story.text())  + "</article>";
				if(HN.pageName === 'ask' || story.title().match(/^(Ask|Tell) HN:/)){
					title_class += ' ask';
					title = HN.util.getAskStoryTitle(story);
{'fraction_non_alphanumeric': 0.19370860927152317, 'fraction_numerical': 0.004415011037527594, 'mean_word_length': 3.6847545219638245, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '2818384', 'n_tokens_mistral': 723, 'n_tokens_neox': 614, 'n_words': 132}