<commit_before>/**
 * Grabs the URL from the user's current tab
 * and puts the data .i.e the whole document
 * inside myWebDiv. 
 *
 **/

chrome.tabs.query(
	{currentWindow: true, active: true},
	function(tabs){
		//Grabs the User's current url
		var tab = tabs[0];
		var url = tab.url;
		$.ajax({ url: url, success: function(data){

			//Puts the data from the url inside the div
			var myWebDiv = document.createElement('div');
			myWebDiv.innerHTML = data;

			//Put all meta tag names inside the metaTags 
			var metaTags = myWebDiv.getElementsByTagName('meta');
			for( var index = 0; index < metaTags.length; index++){
				alert(metaTags[index].getAttribute("content"));
			}

			}
		});

	}
);

//Make a class for Citation
var citation = {
	var title = getWebTitle();
}
//Website title
function getWebTitle(){
	for( var i = 0; i < metaTags.length; i++){
		if(metaTags[i].getAttribute("property") == "og.site_name"){
			return metaTags[i].getAttribute("content");
		}
	}

	return "";
}
//Publisher/sponsor
//Article Title
//Author
//Date posted
//Url (Personal Reference)
//Date you accessed the material<commit_msg>More functions<commit_after>/**
 * Grabs the URL from the user's current tab
 * and puts the data .i.e the whole document
 * inside myWebDiv. 
 *
 **/

chrome.tabs.query(
	{currentWindow: true, active: true},
	function(tabs){
		//Grabs the User's current url
		var tab = tabs[0];
		var url = tab.url;
		$.ajax({ url: url, success: function(data){

			//Puts the data from the url inside the div
			var myWebDiv = document.createElement('div');
			myWebDiv.innerHTML = data;

			//Put all meta tag names inside the metaTags 
			var metaTags = myWebDiv.getElementsByTagName('meta');
			for( var index = 0; index < metaTags.length; index++){
				alert(metaTags[index].getAttribute("content"));
			}

			}
		});

	}
);

//Make a class for Citation
class Citation{
	constructor();
		var webtitle = getWebTitle();
		var publisher;
		var articletitle = getArticleTitle;
		var author = getAuthor;
		var date = getDatePosted();
		var url = getUrl();
		var dateAccessed;
}
//Website title
function getWebTitle(){
	for( var i = 0; i < metaTags.length; i++){
		if(metaTags[i].getAttribute("property") == "og.site_name"){
			return metaTags[i].getAttribute("content");
		}
	}

	return "";
}
//Publisher/sponsor
//Article Title
function getArticleTitle(){
	for( var i = 0; i < metaTags.length; i++){
		if(metaTags[i].getAttribute("property") == "og.title"){
			return metaTags[i].getAttribute("content");
		}
	}

	return "";
}
//Author
function getAuthor(){
	for( var i = 0; i < metaTags.length; i++){
		if(metaTags[i].getAttribute("property") == "author"){
			return metaTags[i].getAttribute("content");
		}
	}

	return "";
}
//Date posted
function getDatePosted(){
	for( var i = 0; i < metaTags.length; i++){
		if(metaTags[i].getAttribute("property") == "og.site_name"){
			return metaTags[i].getAttribute("content");
		}
	}

	return "";
}
//Url (Personal Reference)
function getUrl(){
	for( var i = 0; i < metaTags.length; i++){
		if(metaTags[i].getAttribute("property") == "og.url"){
			return metaTags[i].getAttribute("content");
		}
	}

	return "";
}
//Date you accessed the material
}
{'fraction_non_alphanumeric': 0.16125, 'fraction_numerical': 0.003125, 'mean_word_length': 3.7422222222222223, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 3, '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': '7610509', 'n_tokens_mistral': 1168, 'n_tokens_neox': 1049, 'n_words': 301}