Most of these questions seem to pertain to adding a right click to elements and pages using context menus. I would like to know if it is possible to add a right click option to a Chrome extension's icon. I.e. put an option such as "Documentation" between "Options" and "Disable"
On Chrome, go to 'Settings -> Privacy and Security -> Site Settings -> JavaScript' and then switch off the toggle. You can switch it back on any time you want.
Use the chrome. contextMenus API to add items to Google Chrome's context menu. You can choose what types of objects your context menu additions apply to, such as images, hyperlinks, and pages.
If the page you are on has a text or textarea input, click into this input (as if you want to enter text) then right-click and select 'Inspect element'. Show activity on this post. There you will find Enable right click. Click on it.
You can use Chrome create contextMenus API and set contexts="browser_action"
Example
chrome.contextMenus.create({
"type":"checkbox",
"checked":true,
"title":"Connect via Cloud",
"contexts":["browser_action"],
"onclick":function(info, tab) {
console.log(info);
}
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With