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