Web Extensions and the Contextmenu


John Clarke
I am interested in adding my own options to the browsers contextmenu (https://developer.chrome.com/docs/extensions/reference/contextMenus/). Do you have an example of how to do this ?

I am also reading the materials at https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/user_interface/Context_menu_items

DecSoft

Hello John,

I have no experience with that, however, in the Google Chrome / chrome-extensions-samples at repository at Github, we can see this "simple" sample of context menu. If you pick the raw "sample.js" of the referred sample and copy it in the WebExtBackground app's event (or if you place it as a background script), certainly we can see a context menu of our WebExtension. You must study that "sample.js" code, John, as well the related API documentation.



John Clarke
Thanks. Its just what I needed. I have a working example now.

Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.

This website uses some useful cookies to store your preferences.

I agree. Hide this note. Give me more information.