OLD | NEW |
(Empty) | |
| 1 <!-- BEGIN AUTHORED CONTENT --> |
| 2 <p> |
| 3 The context menus module allows you |
| 4 to add items to Google Chrome's context menu. |
| 5 </p> |
| 6 <p> |
| 7 You can choose what types of objects |
| 8 your context menu additions apply to, |
| 9 such as images, hyperlinks, and pages. |
| 10 </P> |
| 11 <p> |
| 12 You can create as many context menu items |
| 13 as you need, but if more than one |
| 14 from your extension is visible at once, |
| 15 Google Chrome automatically collapses them |
| 16 into a single parent menu. |
| 17 </p> |
| 18 <p> |
| 19 Context menu items can appear in any document |
| 20 (or frame within a document), |
| 21 even those with file:// or chrome:// URLs. |
| 22 To control which documents your items can appear in, |
| 23 specify the documentUrlPatterns field |
| 24 when you call the create() or update() method. |
| 25 </p> |
| 26 <p class="note"> |
| 27 <strong>Version note:</strong> |
| 28 Before Chrome 14, <!-- PENDING(asargent): fix version # --> |
| 29 your items could appear only in documents with http:// |
| 30 or https:// URLs. |
| 31 </p> |
| 32 <h2 id="manifest">Manifest</h2> |
| 33 <p>You must declare the "contextMenus" permission |
| 34 in your extension's manifest to use the API. |
| 35 Also, you should specify a 16x16-pixel icon |
| 36 for display next to your menu item. |
| 37 For example: |
| 38 </p> |
| 39 <pre>{ |
| 40 "name": "My extension", |
| 41 ... |
| 42 "permissions": [ |
| 43 <b>"contextMenus"</b> |
| 44 ], |
| 45 "icons": { |
| 46 <b>"16": "icon-bitty.png",</b> |
| 47 "48": "icon-small.png", |
| 48 "128": "icon-large.png" |
| 49 }, |
| 50 ... |
| 51 }</pre> |
| 52 <h2 id="examples">Examples</h2> |
| 53 <p> |
| 54 You can find samples of this API on the |
| 55 <a href="samples.html#contextMenus">sample page</a>. |
| 56 <!-- END AUTHORED CONTENT --> |
OLD | NEW |