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