I'm aiming to fire an onclick event on a chrome extension using the documented onclicked eventlistener. It's not working.
Below is the code:
chrome.browserAction.onClicked.addListener(function (tab) {
console.log(tab.url);
});
Along with the manifest
{
"manifest_version": 2,
"name": "Seneca One add Bookmark",
"description": "Posts URL to database.",
"version": "2.0",
"background": {
"scripts": ["eventPage.js"],
"persistent": false
},
"browser_action": {
"default_icon": "Favicon@2x.png",
"default_title": "Add bookmark"
},
"permissions": [
"activeTab",
"storage"
]
}
Please any help will be greatly appreciated.