Chrome extension: add option to right click menu when clicking certain HTML element

北城以北 提交于 2019-12-04 10:34:59

问题


I want to create a Chrome extension that adds an option to the right click menu when the user right clicks a certain HTML element (for example a DIV with a known ID).

I would use this to add an option when the user right clicks a tweet on Twitter.com and that option would call a REST service.

Is this posible with a regultar Chrome extension?


回答1:


Yes, these are called Context Menus. You can find the docs for those here: https://developer.chrome.com/extensions/contextMenus



来源:https://stackoverflow.com/questions/11462900/chrome-extension-add-option-to-right-click-menu-when-clicking-certain-html-elem

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!