Files
watchparty/public/background.js
T
2020-03-28 11:47:01 -04:00

9 lines
347 B
JavaScript

// Called when the user clicks on the browser action
chrome.browserAction.onClicked.addListener(function(tab) {
// Send a message to the active tab
chrome.tabs.query({ active: true, currentWindow: true }, function(tabs) {
var activeTab = tabs[0];
chrome.tabs.sendMessage(activeTab.id, { message: 'clicked_browser_action' });
});
});