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