I want to display a simple alert
when user clicks on my extension icon. I have tried this code :
chrome.browserAction.onClicked.addListener(
alert(1)
);
Here is my manifest
:
{
"manifest_version": 2,
"name": "sample",
"description": "des",
"version": "1.0",
"browser_action": {
"default_icon": "icon.png"
},
"permissions": [
]
}
How do I show an alert onClick
event ?
updated:
According the documentation it is like:
and here is the sample from Google (zip-file):