<commit_before><<<<<<< HEAD
// receive message from content script
=======
var tabs = [];

var previousDomain = "";

// recieve message from content script
>>>>>>> origin/master
//301 is the value for the alt key

function recieveMessage(request, sender, sendResponse) {
	var hotkey = request.hotkey;
	console.log("Hotkey: " + hotkey);
}

chrome.runtime.onMessage.addListener(recieveMessage);

// Current Tab Changed
chrome.tabs.onUpdated.addListener(
    function(tabId, changeInfo, tab){
        // Update the previousDomain for a tab
        for(int i = 0; i < tabs.length; i++){
            if(tabs[i].tabId == tabId){
                tabs[i].previousDomain = getTheDomainFromURL(tab.url);
            }
        }
    }
);

// New Tab
chrome.tabs.onCreated.addListener(
    function(tabId, changeInfo, tab){
        // Sets up the new Tab Object and adds it to the tabs array
        tabs.push({ tabId: tabId, previousDomain: tab.url })
    }
);
               
// Tab Closed
chrome.tabs.onRemoved.addListener(
    function(tabId, changeInfo, tab){
        // Removes the closed tab from the tabs array based on tabId
        for(int i = 0; i < tabs.length; i++){
            if(tabs[i].tabId == tabId){
                tabs.splice(i, 1);
                break;
            }
        }
    }
);

function getTheDomainFromURL(url){
    return new URL(url).hostname;
}
<commit_msg>handled merge conflict in background.js<commit_after>
// receive message from content script
var tabs = [];

var previousDomain = "";

// recieve message from content script
//301 is the value for the alt key

function recieveMessage(request, sender, sendResponse) {
	var hotkey = request.hotkey.substring(7,9);
	console.log("Hotkey: " + hotkey);
	
	switch(hotkey){
		case "65": //go to about us
		alert("About Us");
		break;
		case "72": //go to home page
		alert("Home");
		break;
		case "67": //go to contact us
		alert("Contact Us");
		break;
	}
}

chrome.runtime.onMessage.addListener(recieveMessage);

// Current Tab Changed
chrome.tabs.onUpdated.addListener(
    function(tabId, changeInfo, tab){
        // Update the previousDomain for a tab
        for(int i = 0; i < tabs.length; i++){
            if(tabs[i].tabId == tabId){
                tabs[i].previousDomain = getTheDomainFromURL(tab.url);
            }
        }
    }
);

// New Tab
chrome.tabs.onCreated.addListener(
    function(tabId, changeInfo, tab){
        // Sets up the new Tab Object and adds it to the tabs array
        tabs.push({ tabId: tabId, previousDomain: tab.url })
    }
);
               
// Tab Closed
chrome.tabs.onRemoved.addListener(
    function(tabId, changeInfo, tab){
        // Removes the closed tab from the tabs array based on tabId
        for(int i = 0; i < tabs.length; i++){
            if(tabs[i].tabId == tabId){
                tabs.splice(i, 1);
                break;
            }
        }
    }
);

function getTheDomainFromURL(url){
    return new URL(url).hostname;
}

{'fraction_non_alphanumeric': 0.12870619946091644, 'fraction_numerical': 0.006738544474393531, 'mean_word_length': 2.3892694063926943, 'pattern_counts': {'":': 3, '<': 14, '<?xml version=': 0, '>': 10, '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': '5888088', 'n_tokens_mistral': 953, 'n_tokens_neox': 904, 'n_words': 259}