• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 <div id="pageData-name" class="pageData">Context Menus</div>
2 
3 <!-- BEGIN AUTHORED CONTENT -->
4 <p>
5 The context menus module allows you
6 to add items to Google Chrome's context menu.
7 </p>
8 
9 <p>
10 You can choose what types of objects
11 your context menu additions apply to,
12 such as images, hyperlinks, and pages.
13 </P>
14 
15 <p>
16 You can create as many context menu items
17 as you need, but if more than one
18 from your extension is visible at once,
19 Google Chrome automatically collapses them
20 into a single parent menu.
21 </p>
22 
23 <h2 id="manifest">Manifest</h2>
24 <p>You must declare the "contextMenus" permission
25 in your extension's manifest to use the API.
26 Also, you should specify a 16x16-pixel icon
27 for display next to your menu item.
28 For example:
29 </p>
30 
31 <pre>{
32   "name": "My extension",
33   ...
34   "permissions": [
35     <b>"contextMenus"</b>
36   ],
37   "icons": {
38     <b>"16": "icon-bitty.png",</b>
39     "48": "icon-small.png",
40     "128": "icon-large.png"
41   },
42   ...
43 }</pre>
44 
45 <h2 id="examples">Examples</h2>
46 
47 <p>
48 You can find samples of this API on the
49 <a href="samples.html#contextMenus">sample page</a>.
50 
51 <!-- END AUTHORED CONTENT -->
52