Confirmed users
764
edits
(Added a Use Case) |
|||
Line 22: | Line 22: | ||
* Adding an item that acts on a portion of the page -- a node, selection, etc. Examples: | * Adding an item that acts on a portion of the page -- a node, selection, etc. Examples: | ||
** An image-editing extension | ** An image-editing extension adds an "Edit Image" item when the context menu is invoked on an image. | ||
** A search extension | ** A search extension adds a "Search" item when the context menu is invoked while a selection exists. | ||
** An extension adds an "Open Text Link" item when the selection contains a URL outside of an anchor. | |||
* Adding an item that acts on the entire page. Examples: | * Adding an item that acts on the entire page. Examples: | ||
** An extension that makes it easy to edit page source | ** An extension that makes it easy to edit page source adds an "Edit Page Source" item when the context menu is invoked anywhere on the page. | ||
** An image-editing extension | ** An image-editing extension adds an "Edit Page Images" item when the context menu is invoked anywhere on a page that has at least one image. | ||
=== Non-Use Cases === | === Non-Use Cases === | ||
* Adding an item unrelated to the page and its content. Examples: | * Adding an item unrelated to the page and its content. Examples: | ||
** A tab-related extension | ** A tab-related extension adds an item that provides access to all the user's tabs. | ||
** An extension | ** An extension adds an item when it's three o'clock. | ||
* Adding multiple items to the top-level context menu. (Although the API makes it possible, it doesn't necessarily make it simple.) | * Adding multiple items to the top-level context menu. (Although the API makes it possible, it doesn't necessarily make it simple.) | ||
* Radio and checkbox items. | * Radio and checkbox items. |