• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<p>
2The infobars API allows you to add a
3horizontal panel just above a tab's contents,
4as the following screenshot shows.
5</p>
6
7<p>
8<img src="{{static}}/images/infobar.png"
9  width="722" height="150"
10  alt="An infobar asking whether the user wants to translate the current page" />
11</p>
12
13<p>
14Use an infobar to tell the reader
15something about a particular page.
16When the user leaves the page for which the infobar is displayed,
17Google Chrome automatically closes the infobar.
18</p>
19
20<p>
21You implement the content of your
22infobar using HTML. Because infobars are ordinary pages inside an extension,
23they can
24<a href="overview#pageComm">communicate with other extension pages</a>.
25</p>
26
27
28<h2 id="manifest">Manifest</h2>
29
30<p>
31The infobars API is avaiable under "infobars"
32permission and dev channel only. Also, you should specify
33a 16x16-pixel icon for display next to your infobar.
34For example:
35</p>
36
37<pre data-filename="manifest.json">
38{
39  "name": "Andy's infobar extension",
40  "version": "1.0",
41  <b>"permissions": ["infobars"],</b>
42  <b>"icons": {</b>
43    <b>"16": "16.png"</b>
44  <b>},</b>
45  "background": {
46    "scripts": ["background.js"]
47  }
48}
49</pre>
50