Problem
I want to show a popup window or a sidebar window on webpages when the user clicks on a Context Menu item(which I create through my extension ba
The default popup is only shown after the user clicked on the browser action icon.
If you like to use a context menu item you cannot use Chrome's default popup (https://bugs.chromium.org/p/chromium/issues/detail?id=30491). That means you have to come up with another solution to inject HTML code for the user interface in the current web page. One reasonable approach is to inject an iframe. By using an iframe you can recreate an interface like that one you show in the gif.
You can either use option 1b (using sidebar.js
as content script
) or option 2(using iframe
).
But I would prefer option 2 because :