<commit_before>var tabsStore = {};

function updateIconInTab(tab) {
	switch(tabsStore[tab.id]) {
		case 'hasLivelyLoaded': {
			chrome.runtime.sendMessage({ 'newIconPath' : 'media/icon-loaded.png' });
			break;
		}
		case 'canLively': {
			chrome.runtime.sendMessage({ 'newIconPath' : 'media/icon-active.png' });
			break;
		}
		default: {
			chrome.runtime.sendMessage({ 'newIconPath' : 'media/icon-inactive.png' });
			break;
		}
	}
}

function setActiveInTab(tab) {
	if (tab.url.startsWith('http://')) {
		if (tabsStore[tab.id] === 'hasLivelyLoaded') {
			tabsStore[tab.id] = 'hasLivelyLoaded';
		} else {
			tabsStore[tab.id] = 'canLively';
		}<commit_msg>icon active on https:// too, as we can load into https, too.<commit_after>var tabsStore = {};

function updateIconInTab(tab) {
	switch(tabsStore[tab.id]) {
		case 'hasLivelyLoaded': {
			chrome.runtime.sendMessage({ 'newIconPath' : 'media/icon-loaded.png' });
			break;
		}
		case 'canLively': {
			chrome.runtime.sendMessage({ 'newIconPath' : 'media/icon-active.png' });
			break;
		}
		default: {
			chrome.runtime.sendMessage({ 'newIconPath' : 'media/icon-inactive.png' });
			break;
		}
	}
}

function setActiveInTab(tab) {
	if (tab.url.startsWith('http://') || tab.url.startsWith('https://')) {
		if (tabsStore[tab.id] === 'hasLivelyLoaded') {
			tabsStore[tab.id] = 'hasLivelyLoaded';
		} else {
			tabsStore[tab.id] = 'canLively';
		}
{'fraction_non_alphanumeric': 0.18629550321199143, 'fraction_numerical': 0.0, 'mean_word_length': 3.9893238434163703, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5134809', 'n_tokens_mistral': 570, 'n_tokens_neox': 519, 'n_words': 80}