| 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 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 </li><li> | 331 </li><li> |
| 332 <a href="#name">name</a> | 332 <a href="#name">name</a> |
| 333 </li><li> | 333 </li><li> |
| 334 <a href="#nacl_modules">nacl_modules</a> | 334 <a href="#nacl_modules">nacl_modules</a> |
| 335 </li><li> | 335 </li><li> |
| 336 <a href="#offline_enabled">offline_enabled</a> | 336 <a href="#offline_enabled">offline_enabled</a> |
| 337 </li><li> | 337 </li><li> |
| 338 <a href="#permissions">permissions</a> | 338 <a href="#permissions">permissions</a> |
| 339 </li><li> | 339 </li><li> |
| 340 <a href="#version">version</a> | 340 <a href="#version">version</a> |
| 341 </li><li> |
| 342 <a href="#manifest_version">manifest_version</a> |
| 341 </li> | 343 </li> |
| 342 </ol> | 344 </ol> |
| 343 </li> | 345 </li> |
| 344 <li style="display: none; "> | 346 <li style="display: none; "> |
| 345 <a href="#apiReference">API reference</a> | 347 <a href="#apiReference">API reference</a> |
| 346 <ol> | 348 <ol> |
| 347 <div></div> | 349 <div></div> |
| 348 <div></div> | 350 <div></div> |
| 349 <div></div> | 351 <div></div> |
| 350 <div></div> | 352 <div></div> |
| (...skipping 25 matching lines...) Expand all Loading... |
| 376 The following code shows the supported manifest fields, | 378 The following code shows the supported manifest fields, |
| 377 with links to the page that discusses each field. | 379 with links to the page that discusses each field. |
| 378 The only fields that are always required | 380 The only fields that are always required |
| 379 are <b>name</b> and <b>version</b>. | 381 are <b>name</b> and <b>version</b>. |
| 380 </p> | 382 </p> |
| 381 | 383 |
| 382 <pre>{ | 384 <pre>{ |
| 383 <em>// Required</em> | 385 <em>// Required</em> |
| 384 "<a href="#name">name</a>": "<em>My Extension</em>", | 386 "<a href="#name">name</a>": "<em>My Extension</em>", |
| 385 "<a href="#version">version</a>": "<em>versionString</em>", | 387 "<a href="#version">version</a>": "<em>versionString</em>", |
| 388 "<a href="#manifest_version">manifest_version</a>": 2, |
| 386 | 389 |
| 387 <em>// Recommended</em> | 390 <em>// Recommended</em> |
| 388 "<a href="#description">description</a>": "<em>A plain text description</em>", | 391 "<a href="#description">description</a>": "<em>A plain text description</em>", |
| 389 "<a href="#icons">icons</a>": { ... }, | 392 "<a href="#icons">icons</a>": { ... }, |
| 390 "<a href="#default_locale">default_locale</a>": "<em>en</em>", | 393 "<a href="#default_locale">default_locale</a>": "<em>en</em>", |
| 391 | 394 |
| 392 <em>// Pick one (or none)</em> | 395 <em>// Pick one (or none)</em> |
| 393 "<a href="browserAction.html">browser_action</a>": {...}, | 396 "<a href="browserAction.html">browser_action</a>": {...}, |
| 394 "<a href="pageAction.html">page_action</a>": {...}, | 397 "<a href="pageAction.html">page_action</a>": {...}, |
| 395 "<a href="themes.html">theme</a>": {...}, | 398 "<a href="themes.html">theme</a>": {...}, |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 466 The description should be suitable for both | 469 The description should be suitable for both |
| 467 the browser's extension management UI | 470 the browser's extension management UI |
| 468 and the <a href="https://chrome.google.com/webstore">Chrome Web Store</a>. | 471 and the <a href="https://chrome.google.com/webstore">Chrome Web Store</a>. |
| 469 You can specify locale-specific strings for this field; | 472 You can specify locale-specific strings for this field; |
| 470 see <a href="i18n.html">Internationalization</a> for details. | 473 see <a href="i18n.html">Internationalization</a> for details. |
| 471 </p> | 474 </p> |
| 472 | 475 |
| 473 <h3 id="content_security_policy">content_security_policy</h3> | 476 <h3 id="content_security_policy">content_security_policy</h3> |
| 474 | 477 |
| 475 <p> | 478 <p> |
| 476 A security policy to apply to resources in your extension. | 479 A security policy to apply to resources in your extension. You can use this |
| 477 You can use this policy to help prevent cross-site scripting | 480 policy to help prevent cross-site scripting vulnerabilities in your extension. |
| 478 vulnerabilities in your extension. | 481 By default, the extension system enforces the following policy: |
| 479 To specify that your extension loads resources | 482 </p> |
| 480 only from its own package, use the following policy: | 483 |
| 484 <pre>script-src 'self'; object-src 'self'</pre> |
| 485 |
| 486 <p> |
| 487 Extensions can tighten their policy using the |
| 488 <code>content_security_policy</code> manifest attribute. For example, to |
| 489 specify that your extension loads resources only from its own package, use the |
| 490 following policy: |
| 481 </p> | 491 </p> |
| 482 | 492 |
| 483 <pre>"content_security_policy": "default-src 'self' " </pre> | 493 <pre>"content_security_policy": "default-src 'self' " </pre> |
| 484 | 494 |
| 485 <p> | 495 <p> |
| 486 If you need to load resources from websites, | 496 If you need to load resources from websites, |
| 487 you can add them to the whitelist. | 497 you can add them to the whitelist. |
| 488 For example, if your extension uses Google Analytics, | 498 For example, if your extension uses Google Analytics, |
| 489 you might use the following policy: | 499 you might use the following policy: |
| 490 </p> | 500 </p> |
| 491 | 501 |
| 492 <pre>"content_security_policy": "default-src 'self' https://ssl.google-analytics
.com"</pre> | 502 <pre>"content_security_policy": "default-src 'self' https://ssl.google-analytics
.com"</pre> |
| 493 | 503 |
| 494 <p> | 504 <p> |
| 505 The extension system will prevent you including insecure resources |
| 506 for <code>script-src</code> or <code>object-src</code>. If you are using |
| 507 <code>eval</code> to parse JSON, please consider using <code>JSON.parse</code> |
| 508 instead. |
| 509 </p> |
| 510 |
| 511 <p> |
| 495 For details, see the | 512 For details, see the |
| 496 <a href="http://dvcs.w3.org/hg/content-security-policy/raw-file/tip/csp-specific
ation.dev.html">Content Security Policy specification</a>. | 513 <a href="http://dvcs.w3.org/hg/content-security-policy/raw-file/tip/csp-specific
ation.dev.html">Content Security Policy specification</a>. |
| 497 </p> | 514 </p> |
| 498 | 515 |
| 499 | 516 |
| 500 <h3 id="homepage_url">homepage_url</h3> | 517 <h3 id="homepage_url">homepage_url</h3> |
| 501 | 518 |
| 502 <p> | 519 <p> |
| 503 The URL of the homepage for this extension. The extensions management page (chro
me://extensions) | 520 The URL of the homepage for this extension. The extensions management page (chro
me://extensions) |
| 504 will contain a link to this URL. This field is particularly useful if you | 521 will contain a link to this URL. This field is particularly useful if you |
| (...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1005 <p> | 1022 <p> |
| 1006 A missing integer is equal to zero. | 1023 A missing integer is equal to zero. |
| 1007 For example, 1.1.9.9999 is newer than 1.1. | 1024 For example, 1.1.9.9999 is newer than 1.1. |
| 1008 </p> | 1025 </p> |
| 1009 | 1026 |
| 1010 <p> | 1027 <p> |
| 1011 For more information, see | 1028 For more information, see |
| 1012 <a href="autoupdate.html">Autoupdating</a>. | 1029 <a href="autoupdate.html">Autoupdating</a>. |
| 1013 </p> | 1030 </p> |
| 1014 | 1031 |
| 1032 |
| 1033 <h3 id="manifest_version">manifest_version</h3> |
| 1034 |
| 1035 <p> |
| 1036 The version of the manifest format that this extension uses. Currently, |
| 1037 extensions should use the value <code>2</code> (without quotes): |
| 1038 </p> |
| 1039 |
| 1040 <pre>"manifest_version": 2</pre> |
| 1041 |
| 1042 <p> |
| 1043 Future breaking changes to the extension system may require a new version |
| 1044 number. |
| 1045 </p> |
| 1046 |
| 1047 |
| 1015 <!-- [PENDING: Possibly: point to the store/dashboard and make a big deal of the
fact that autoupdating is free if you use them.] --> | 1048 <!-- [PENDING: Possibly: point to the store/dashboard and make a big deal of the
fact that autoupdating is free if you use them.] --> |
| 1016 </div> | 1049 </div> |
| 1017 | 1050 |
| 1018 <!-- API PAGE --> | 1051 <!-- API PAGE --> |
| 1019 <div class="apiPage" style="display: none; "> | 1052 <div class="apiPage" style="display: none; "> |
| 1020 <a name="apiReference"></a> | 1053 <a name="apiReference"></a> |
| 1021 <h2>API reference: chrome.apiname </h2> | 1054 <h2>API reference: chrome.apiname </h2> |
| 1022 | 1055 |
| 1023 <!-- PROPERTIES --> | 1056 <!-- PROPERTIES --> |
| 1024 <div class="apiGroup"> | 1057 <div class="apiGroup"> |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1221 _uff=0; | 1254 _uff=0; |
| 1222 urchinTracker(); | 1255 urchinTracker(); |
| 1223 } | 1256 } |
| 1224 catch(e) {/* urchinTracker not available. */} | 1257 catch(e) {/* urchinTracker not available. */} |
| 1225 </script> | 1258 </script> |
| 1226 <!-- end analytics --> | 1259 <!-- end analytics --> |
| 1227 </div> | 1260 </div> |
| 1228 </div> <!-- /gc-footer --> | 1261 </div> <!-- /gc-footer --> |
| 1229 </div> <!-- /gc-container --> | 1262 </div> <!-- /gc-container --> |
| 1230 </body></html> | 1263 </body></html> |
| OLD | NEW |