OLD | NEW |
(Empty) | |
| 1 <!-- BEGIN AUTHORED CONTENT --> |
| 2 <p> |
| 3 The infobars API allows you to add a |
| 4 horizontal panel just above a tab's contents, |
| 5 as the following screenshot shows. |
| 6 </p> |
| 7 <p> |
| 8 <img src="/static/images/infobar.png" |
| 9 width="566" height="150" |
| 10 alt="An infobar asking whether the user wants to translate the current page" /
> |
| 11 </p> |
| 12 <p> |
| 13 Use an infobar to tell the reader |
| 14 something about a particular page. |
| 15 When the user leaves the page for which the infobar is displayed, |
| 16 Google Chrome automatically closes the infobar. |
| 17 </p> |
| 18 <p> |
| 19 You implement the content of your |
| 20 infobar using HTML. Because infobars are ordinary pages inside an extension, |
| 21 they can |
| 22 <a href="overview.html#pageComm">communicate with other extension pages</a>. |
| 23 </p> |
| 24 <h2 id="manifest">Manifest</h2> |
| 25 <p> |
| 26 The infobars API is currently |
| 27 experimental, so you must declare the "experimental" |
| 28 permission to use it. Also, you should specify |
| 29 a 16x16-pixel icon for display next to your infobar. |
| 30 For example: |
| 31 </p> |
| 32 <pre>{ |
| 33 "name": "Andy's infobar extension", |
| 34 "version": "1.0", |
| 35 <b>"permissions": ["experimental"],</b> |
| 36 <b>"icons": {</b> |
| 37 <b>"16": "16.png"</b> |
| 38 <b>},</b> |
| 39 "background": { |
| 40 "scripts": ["background.js"] |
| 41 } |
| 42 }</pre> |
| 43 <!-- END AUTHORED CONTENT --> |
OLD | NEW |