Reputation: 925
My manifest includes a nice icon and my background.js page triggers the extension's main functionality.
Is there some easy way to get the exact same functionality within the notification tray? In other words, is there any way to put an icon in the task bar (like google does with the hangouts extension), and trigger a single event when it is clicked.
Here is the code I use for the action button in the browser itself:
chrome.browserAction.onClicked.addListener(function(tab)
{
mainFunction();
});
I'd imagine there is a simple addition to the manifest along with a simple line like the above, that would achieve my desired result.
Upvotes: 1
Views: 1449
Reputation: 152027
Chrome extensions don't have access to the system tray, and there is no API for that.
Hangouts is specifically whitelisted in the Chromium source code to get some special privileges.
Upvotes: 3