| OLD | NEW |
| 1 <!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc.
Note: | 1 <!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc.
Note: |
| 2 1) The <head> information in this page is significant, should be uniform | 2 1) The <head> information in this page is significant, should be uniform |
| 3 across api docs and should be edited only with knowledge of the | 3 across api docs and should be edited only with knowledge of the |
| 4 templating mechanism. | 4 templating mechanism. |
| 5 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a | 5 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a |
| 6 browser, it will be re-generated from the template, json schema and | 6 browser, it will be re-generated from the template, json schema and |
| 7 authored overview content. | 7 authored overview content. |
| 8 4) The <body>.innerHTML is also generated by an offline step so that this | 8 4) The <body>.innerHTML is also generated by an offline step so that this |
| 9 page may easily be indexed by search engines. | 9 page may easily be indexed by search engines. |
| 10 --><html xmlns="http://www.w3.org/1999/xhtml"><head> | 10 --><html xmlns="http://www.w3.org/1999/xhtml"><head> |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 <li jsinstance="*0" style="display: none; "> | 166 <li jsinstance="*0" style="display: none; "> |
| 167 <a>h3Name</a> | 167 <a>h3Name</a> |
| 168 </li> | 168 </li> |
| 169 </ol> | 169 </ol> |
| 170 </li><li jsinstance="*1"> | 170 </li><li jsinstance="*1"> |
| 171 <a href="#H2-1">Field details</a> | 171 <a href="#H2-1">Field details</a> |
| 172 <ol> | 172 <ol> |
| 173 <li jsinstance="0"> | 173 <li jsinstance="0"> |
| 174 <a href="#description">description</a> | 174 <a href="#description">description</a> |
| 175 </li><li jsinstance="1"> | 175 </li><li jsinstance="1"> |
| 176 <a href="#icon">icon</a> | 176 <a href="#icons">icons</a> |
| 177 </li><li jsinstance="2"> | 177 </li><li jsinstance="2"> |
| 178 <a href="#icons">icons</a> | 178 <a href="#name">name</a> |
| 179 </li><li jsinstance="3"> | 179 </li><li jsinstance="3"> |
| 180 <a href="#name">name</a> | 180 <a href="#permissions">permissions</a> |
| 181 </li><li jsinstance="*4"> | 181 </li><li jsinstance="*4"> |
| 182 <a href="#permissions">permissions</a> | 182 <a href="#version">version</a> |
| 183 </li> | 183 </li> |
| 184 </ol> | 184 </ol> |
| 185 </li> | 185 </li> |
| 186 <div style="display: none; "> | 186 <div style="display: none; "> |
| 187 <li> | 187 <li> |
| 188 <a href="#apiReference">API reference</a> | 188 <a href="#apiReference">API reference</a> |
| 189 <ol> | 189 <ol> |
| 190 <li> | 190 <li> |
| 191 <a href="#properties">Properties</a> | 191 <a href="#properties">Properties</a> |
| 192 <ol> | 192 <ol> |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 <h2 id="overview"> Field summary </h2> | 240 <h2 id="overview"> Field summary </h2> |
| 241 | 241 |
| 242 <p> | 242 <p> |
| 243 The following code shows the supported manifest fields, | 243 The following code shows the supported manifest fields, |
| 244 with links to the page that discusses each field. | 244 with links to the page that discusses each field. |
| 245 The only fields that are required for every extension | 245 The only fields that are required for every extension |
| 246 are <b>name</b> and <b>version</b>. | 246 are <b>name</b> and <b>version</b>. |
| 247 </p> | 247 </p> |
| 248 | 248 |
| 249 <pre>{ | 249 <pre>{ |
| 250 <b>"<a href="#name">name</a>"</b>: "<em>My Extension</em>", | 250 <em>// Required</em> |
| 251 <b>"<a href="autoupdate.html">version</a>"</b>: "<em>versionString</em>", | 251 "<a href="#name">name</a>": "<em>My Extension</em>", |
| 252 "<a href="#version">version</a>": "<em>versionString</em>", |
| 252 | 253 |
| 254 <em>// Recommended</em> |
| 253 "<a href="#description">description</a>": "<em>A plain text description</em>", | 255 "<a href="#description">description</a>": "<em>A plain text description</em>", |
| 254 "<a href="#icons">icons</a>": { ... }, | 256 "<a href="#icons">icons</a>": { ... }, |
| 255 "<a href="autoupdate.html">update_url</a>": "http://<em>path/to/updateInfo</em
>.xml", | |
| 256 | 257 |
| 258 <em>// Pick one (or none)</em> |
| 259 "<a href="browserAction.html">brower_action</a>": {...}, |
| 260 "<a href="pageAction.html">page_action</a>": {...}, |
| 261 "<a href="themes.html">theme</a>": {...}, |
| 262 |
| 263 <em>// Add any of these that you need</em> |
| 257 "<a href="background_pages.html">background_page</a>": "<em>aFile</em>.html", | 264 "<a href="background_pages.html">background_page</a>": "<em>aFile</em>.html", |
| 258 "<a href="browserAction.html">brower_action</a>": {...}, | |
| 259 "<a href="ntp.html">chrome_url_overrides</a>": {...}, | 265 "<a href="ntp.html">chrome_url_overrides</a>": {...}, |
| 260 "<a href="content_scripts.html">content_scripts</a>": [...], | 266 "<a href="content_scripts.html">content_scripts</a>": [...], |
| 261 "<a href="pageAction.html">page_action</a>": {...}, | 267 "<a href="options.html">options_page</a>": "<em>aFile</em>.html", |
| 262 "<a href="#permissions">permissions</a>": [...], | 268 "<a href="#permissions">permissions</a>": [...], |
| 263 "<a href="npapi.html">plugins</a>": [...], | 269 "<a href="npapi.html">plugins</a>": [...] |
| 264 "<a href="themes.html">theme</a>": {...}, | 270 "<a href="autoupdate.html">update_url</a>": "http://<em>path/to/updateInfo</em
>.xml", |
| 265 "<a href="toolstrip.html">toolstrips</a>": [...], | |
| 266 "<a href="options.html">options_page</a>": "<em>aFile</em>.html", | |
| 267 } | 271 } |
| 268 </pre> | 272 </pre> |
| 269 | 273 |
| 270 | 274 |
| 271 <a name="H2-1"></a><h2>Field details</h2> | 275 <a name="H2-1"></a><h2>Field details</h2> |
| 272 | 276 |
| 273 <p> | 277 <p> |
| 274 This section covers fields that aren't described in another page. | 278 This section covers fields that aren't described in another page. |
| 275 For a complete list of fields, | 279 For a complete list of fields, |
| 276 with links to where they're described in detail, | 280 with links to where they're described in detail, |
| 277 see the <a href="#overview">Field summary</a>. | 281 see the <a href="#overview">Field summary</a>. |
| 278 </p> | 282 </p> |
| 279 | 283 |
| 280 <h3 id="description">description</h3> | 284 <h3 id="description">description</h3> |
| 281 | 285 |
| 282 <p> | 286 <p> |
| 283 A plain text string | 287 A plain text string |
| 284 (no HTML or other formatting) | 288 (no HTML or other formatting) |
| 285 that describes the extension. | 289 that describes the extension. |
| 286 The description should be suitable for both | 290 The description should be suitable for both |
| 287 the browser's extension management UI | 291 the browser's extension management UI |
| 288 and the extension gallery. | 292 and the extension gallery. |
| 289 </p> | 293 </p> |
| 290 | 294 |
| 291 <h3 id="icon">icon</h3> | |
| 292 | |
| 293 <p> | |
| 294 An icon that represents the extension. | |
| 295 As a rule, you should use the <b>icons</b> field instead, | |
| 296 so that you can specify icons in multiple sizes. | |
| 297 Here's an example of using this field: | |
| 298 </p> | |
| 299 | |
| 300 <pre>"icon": "icon.png", | |
| 301 </pre> | |
| 302 | 295 |
| 303 <h3 id="icons">icons</h3> | 296 <h3 id="icons">icons</h3> |
| 304 | 297 |
| 305 <p> | 298 <p> |
| 306 One or more icons that represent the extension. | 299 One or more icons that represent the extension. |
| 307 We recommend that you provide icons in four sizes — | 300 We recommend that you provide icons in four sizes — |
| 308 16x16, 32x32, 48x48, and 128x128 pixels. | 301 16x16, 32x32, 48x48, and 128x128 pixels. |
| 309 The icons can be in any format supported by WebKit, | 302 The icons can be in any format supported by WebKit, |
| 310 such as BMP, GIF, ICO, JPEG, or PNG. | 303 such as BMP, GIF, ICO, JPEG, or PNG. |
| 311 Here's an example of specifying all four icon sizes: | 304 Here's an example of specifying all four icon sizes: |
| (...skipping 12 matching lines...) Expand all Loading... |
| 324 A short, plain text string | 317 A short, plain text string |
| 325 that identifies the extension. | 318 that identifies the extension. |
| 326 The name is used in the install dialog, | 319 The name is used in the install dialog, |
| 327 extension management UI, | 320 extension management UI, |
| 328 and the extension gallery. | 321 and the extension gallery. |
| 329 </p> | 322 </p> |
| 330 | 323 |
| 331 <h3 id="permissions">permissions</h3> | 324 <h3 id="permissions">permissions</h3> |
| 332 | 325 |
| 333 <p> | 326 <p> |
| 334 The capabilities the extension might use. | 327 An array of permissions that the extension might use. |
| 335 A permission can be either one of a list of known strings | 328 Each permission can be either one of a list of known strings |
| 336 (currently, either "tabs" or "bookmarks") | 329 (such as "tabs" or "bookmarks") |
| 337 or a match pattern, | 330 or a match pattern |
| 338 which gives access to one or more hosts. | 331 that gives access to one or more hosts. |
| 339 The idea is not to restrict what you can do, | 332 These permissions are displayed to users before installation. |
| 340 but to give advanced users an indication of what your extension | |
| 341 will be able to do. | |
| 342 Permissions might also help to limit damage | 333 Permissions might also help to limit damage |
| 343 if your extension is attacked. | 334 if your extension is attacked. |
| 344 </p> | 335 </p> |
| 345 | 336 |
| 346 <p> | 337 <p> |
| 338 If an API requires you to declare a permission in the manifest, |
| 339 then its documentation tells you how to do so. |
| 340 For example, |
| 341 the <a href="tabs.html">Tabs</a> page |
| 342 shows you how to |
| 343 declare the "tabs" permission. |
| 344 </p> |
| 345 |
| 346 <p> |
| 347 Here's an example of the permissions part of a manifest file: | 347 Here's an example of the permissions part of a manifest file: |
| 348 </p> | 348 </p> |
| 349 | 349 |
| 350 <pre>"permissions": [ | 350 <pre>"permissions": [ |
| 351 "tabs", | 351 "tabs", |
| 352 "bookmarks", | 352 "bookmarks", |
| 353 "http://www.blogger.com/", | 353 "http://www.blogger.com/", |
| 354 "http://*.google.com/" | 354 "http://*.google.com/" |
| 355 ], | 355 ], |
| 356 </pre> | 356 </pre> |
| 357 | 357 |
| 358 <p> | 358 <p> |
| 359 For more information, see | 359 For more information, see |
| 360 <a href="xhr.html">Cross-Origin XMLHttpRequest</a>, | 360 <a href="xhr.html">Cross-Origin XMLHttpRequest</a>, |
| 361 <a href="windows.html">Windows</a>, | 361 <a href="windows.html">Windows</a>, |
| 362 <a href="tabs.html">Tabs</a>, and | 362 <a href="tabs.html">Tabs</a>, and |
| 363 <a href="bookmarks.html">Bookmarks</a>. | 363 <a href="bookmarks.html">Bookmarks</a>. |
| 364 </p> | 364 </p> |
| 365 | 365 |
| 366 <h3 id="version">version</h3> |
| 367 |
| 368 <p> |
| 369 One to four dot-separated integers |
| 370 identifying the version of this extension. |
| 371 Examples: |
| 372 </p> |
| 373 |
| 374 <ul> |
| 375 <li> <code>"version": "1"</code> </li> |
| 376 <li> <code>"version": "1.0"</code> </li> |
| 377 <li> <code>"version": "2.10.2"</code> </li> |
| 378 <li> <code>"version": "3.1.2.4567"</code> </li> |
| 379 </ul> |
| 380 |
| 381 <p> |
| 382 The autoupdate system compares versions |
| 383 to determine whether an installed extension |
| 384 needs to be updated. |
| 385 If the published extension has a newer version string |
| 386 than the installed extension, |
| 387 then the extension is automatically updated. |
| 388 </p> |
| 389 |
| 390 <p> |
| 391 The comparison starts with the leftmost integers. |
| 392 If those integers are equal, |
| 393 the integers to the right are compared, |
| 394 and so on. |
| 395 For example, 1.2.0 is a newer version than 1.1.9.99999. |
| 396 </p> |
| 397 |
| 398 <p> |
| 399 A missing integer is equal to zero. |
| 400 For example, 1.1.9.99999 is newer than 1.1. |
| 401 </p> |
| 402 |
| 403 <p> |
| 404 For more information, see |
| 405 <a href="autoupdate.html">Autoupdating</a>. |
| 406 </p> |
| 407 |
| 408 <p class="comment"> |
| 409 [PENDING: Once the gallery is published, point to it |
| 410 and make a big deal of the fact that autoupdating is free |
| 411 if you use the gallery.] |
| 412 </p> |
| 366 </div> | 413 </div> |
| 367 | 414 |
| 368 <!-- API PAGE --> | 415 <!-- API PAGE --> |
| 369 <div class="apiPage" style="display: none; "> | 416 <div class="apiPage" style="display: none; "> |
| 370 <a name="apiReference"></a> | 417 <a name="apiReference"></a> |
| 371 <h2>API reference: chrome.apiname </h2> | 418 <h2>API reference: chrome.apiname </h2> |
| 372 | 419 |
| 373 <!-- PROPERTIES --> | 420 <!-- PROPERTIES --> |
| 374 <div class="apiGroup"> | 421 <div class="apiGroup"> |
| 375 <a name="properties"></a> | 422 <a name="properties"></a> |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 539 urchinTracker(); | 586 urchinTracker(); |
| 540 } | 587 } |
| 541 catch(e) {/* urchinTracker not available. */} | 588 catch(e) {/* urchinTracker not available. */} |
| 542 </script> | 589 </script> |
| 543 <!-- end analytics --> | 590 <!-- end analytics --> |
| 544 | 591 |
| 545 </div> <!-- /pageFooter --> | 592 </div> <!-- /pageFooter --> |
| 546 </div> <!-- /container --> | 593 </div> <!-- /container --> |
| 547 </body></html> | 594 </body></html> |
| 548 | 595 |
| OLD | NEW |