<commit_before>chrome.browserAction.onClicked.addListener(function(tab) {
	var toCreate = { url: chrome.extension.getURL('/views/main.html') };
	chrome.tabs.query(toCreate, function(tabs) {
		if (tabs.length === 0) {
			chrome.tabs.create(toCreate);
		}
	});
});<commit_msg>[#3] Tab clustering not displayed if already opened Focus on window and tab containing the extension.<commit_after>chrome.browserAction.onClicked.addListener(function(tab) {
	var toCreate = { url: chrome.extension.getURL('/views/main.html') };
	chrome.tabs.query(toCreate, function(tabs) {
		if (tabs.length === 0) {
			chrome.tabs.create(toCreate);
		} else {
			var tab = tabs[0];
			chrome.tabs.update(tab.id, { active: true });
			chrome.windows.update(tab.windowId, { focused: true });
		}
	});
});
{'fraction_non_alphanumeric': 0.16731016731016732, 'fraction_numerical': 0.005148005148005148, 'mean_word_length': 4.678832116788321, 'pattern_counts': {'":': 0, '<': 3, '<?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': '5963093', 'n_tokens_mistral': 278, 'n_tokens_neox': 254, 'n_words': 47}