I'm trying to display the extension when I rigth click on the custom item menu is there any way to make it , here is the code that I'm trying to pop up the popup.html. the manifest.json look like this:
"background": {
"scripts": ["eventPage.js"],
"persistent": false
},
"web_accessible_resources": [
"popup.html"
],
"permissions": [
"storage",
"notifications",
"contextMenus",
"identity.email",
"identity"
],
"options_page": "options.html"
the rigth click on the eventPage.js is the follow:
var menuItem = {
"id": "HashTag",
"title": "Create HashTag",
"contexts": ["selection"]
};
chrome.contextMenus.create(menuItem);
//On click on the menu Item to get the function
chrome.contextMenus.onClicked.addListener(function (clickData) {
copyToClipboard(clickData.selectionText);
if (clickData.menuItemId == "HashTag" && clickData.selectionText) {
}
});