1

I have been searched the answer for this question , but did not found exact answer at all.

So, when we click the right click on extension icon we usually, if we did not add something manually, have next options in it:

enter image description here

If I`d like to catch click event on those options, what event I should do registration?

I tried for:

chrome.browserAction.onClicked.addListener(function (){
    debugger;
});

But above catches click on icon itself and not on items inside icon context menu.

The original problem was with uninstall click inside this context menu, it is not sending uninstall data to uninstall URL , which was defined as:

chrome.runtime.setUninstallURL(uninstallURL); // URL length limitation: maximum 255 characters.

Thanks for help

AlexBerd
  • 1,368
  • 2
  • 18
  • 39
  • If it's not sending it, and you're sure that `setUninstallURL` is properly called before this happens, this is a bug and should be reported. Construct a minimal example and submit a bug at https://crbug.com/new – Xan May 30 '16 at 08:52
  • @Xan It is not in Google chrome browser, but in Chromium browser. I already sent the bug question to development. Thanks for advise – AlexBerd May 30 '16 at 09:44
  • If you did submit it, please add a comment linking to the bug. – Xan May 30 '16 at 10:47

1 Answers1

2

These options are managed by browser itself, you can't catch click event on them.

However, you could add your own contextMenus options for browser action, see Add contextmenu items to a Chrome extension's browser action button for more details.

And please be aware you can't catch right click event on browser action itself.

Community
  • 1
  • 1
Haibara Ai
  • 10,703
  • 2
  • 31
  • 47
  • Thanks for advise. After long investigation the problem suppose to be in Chromium browser that our company uses. – AlexBerd May 30 '16 at 09:45