| 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 <li><a href="history.html">History</a></li> | 125 <li><a href="history.html">History</a></li> |
| 126 <li><a href="management.html">Management</a></li> | 126 <li><a href="management.html">Management</a></li> |
| 127 <li><a href="tabs.html">Tabs</a></li> | 127 <li><a href="tabs.html">Tabs</a></li> |
| 128 <li><a href="windows.html">Windows</a></li> | 128 <li><a href="windows.html">Windows</a></li> |
| 129 </ul> | 129 </ul> |
| 130 </li> | 130 </li> |
| 131 <li>Implementation | 131 <li>Implementation |
| 132 <ul> | 132 <ul> |
| 133 <li><a href="a11y.html">Accessibility</a></li> | 133 <li><a href="a11y.html">Accessibility</a></li> |
| 134 <li><a href="background_pages.html">Background Pages</a></li> | 134 <li><a href="background_pages.html">Background Pages</a></li> |
| 135 <li><a href="transient_background_pages.html">Event Pages</a><
/li> |
| 135 <li><a href="content_scripts.html">Content Scripts</a></li> | 136 <li><a href="content_scripts.html">Content Scripts</a></li> |
| 136 <li><a href="xhr.html">Cross-Origin XHR</a></li> | 137 <li><a href="xhr.html">Cross-Origin XHR</a></li> |
| 137 <li><a href="i18n.html">Internationalization</a></li> | 138 <li><a href="i18n.html">Internationalization</a></li> |
| 138 <li><a href="messaging.html">Message Passing</a></li> | 139 <li><a href="messaging.html">Message Passing</a></li> |
| 139 <li><a href="permissions.html">Optional Permissions</a></li> | 140 <li><a href="permissions.html">Optional Permissions</a></li> |
| 140 <li><a href="npapi.html">NPAPI Plugins</a></li> | 141 <li><a href="npapi.html">NPAPI Plugins</a></li> |
| 141 </ul> | 142 </ul> |
| 142 </li> | 143 </li> |
| 143 <li>Finishing | 144 <li>Finishing |
| 144 <ul> | 145 <ul> |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 <ol> | 213 <ol> |
| 213 </ol> | 214 </ol> |
| 214 </li> | 215 </li> |
| 215 </ol> | 216 </ol> |
| 216 </div> | 217 </div> |
| 217 <!-- /TABLE OF CONTENTS --> | 218 <!-- /TABLE OF CONTENTS --> |
| 218 <!-- Standard content lead-in for experimental API pages --> | 219 <!-- Standard content lead-in for experimental API pages --> |
| 219 <!-- STATIC CONTENT PLACEHOLDER --> | 220 <!-- STATIC CONTENT PLACEHOLDER --> |
| 220 <div id="static"><div id="pageData-name" class="pageData">Packaging</div
> | 221 <div id="static"><div id="pageData-name" class="pageData">Packaging</div
> |
| 221 <div id="pageData-showTOC" class="pageData">true</div> | 222 <div id="pageData-showTOC" class="pageData">true</div> |
| 223 <p class="note"> |
| 224 <b>For Advanced Developers Only:</b> |
| 225 Do not follow the instructions on this page |
| 226 unless you understand the security implications |
| 227 of packaging and hosting files on your own server. |
| 228 If you host on the Chrome Web Store, |
| 229 you do not need to worry |
| 230 about packaging or self-hosting. |
| 231 </p> |
| 222 <p> | 232 <p> |
| 223 This page describes how to package your extension. | 233 This page describes how to package your extension. |
| 224 As the <a href="overview.html">Overview</a> explains, | 234 As the <a href="overview.html">Overview</a> explains, |
| 225 extensions are packaged as signed ZIP files | 235 extensions are packaged as signed ZIP files |
| 226 with the file extension "crx"—for example, | 236 with the file extension "crx"—for example, |
| 227 <code>myextension.crx</code>. | 237 <code>myextension.crx</code>. |
| 228 </p> | 238 </p> |
| 229 <p> | 239 <p> |
| 230 <b>Note:</b> | 240 You do not need to package your own extension. |
| 231 You might not need to package your extension. | |
| 232 If you publish your extension using the | 241 If you publish your extension using the |
| 233 <a href="https://chrome.google.com/webstore/developer/dashboard">Chrome Develope
r Dashboard</a>, | 242 <a href="https://chrome.google.com/webstore/developer/dashboard">Chrome Develope
r Dashboard</a>, |
| 234 then the only reason to create your own <code>.crx</code> file | 243 then the only reason to create your own <code>.crx</code> file |
| 235 would be to distribute a non-public version—for example, | 244 would be to distribute a non-public version—for example, |
| 236 to alpha testers. | 245 to alpha testers. |
| 237 You can find information on publishing extensions and apps in the | 246 You can find information on publishing extensions and apps in the |
| 238 Chrome Web Store getting started tutorial, starting at | 247 Chrome Web Store getting started tutorial, starting at |
| 239 <a href="http://code.google.com/chrome/webstore/docs/get_started_simple.html#ste
p5">Step 5: Zip up your app</a>. | 248 <a href="http://code.google.com/chrome/webstore/docs/get_started_simple.html#ste
p5">Step 5: Zip up your app</a>. |
| 240 </p> | 249 </p> |
| 241 <p> | 250 <p> |
| 242 When you package an extension, | 251 When you package an extension, |
| 243 the extension is assigned a unique key pair. | 252 the extension is assigned a unique key pair. |
| 244 The extension's ID is based on a hash of the public key. | 253 The extension's ID is based on a hash of the public key. |
| 245 The private key is kept private | 254 The private key is used to sign each version of the extension |
| 246 and used to sign each version of the extension. | 255 and must be secured from public access. |
| 256 Do not store the private key in your packaged files. |
| 247 </p> | 257 </p> |
| 248 <a name="H2-0"></a><h2>Creating a package</h2> | 258 <a name="H2-0"></a><h2>Creating a package</h2> |
| 249 <p>To package an extension:</p> | 259 <p>To package an extension:</p> |
| 250 <ol> | 260 <ol> |
| 251 <li> | 261 <li> |
| 252 Bring up the Extensions management page | 262 Bring up the Extensions management page |
| 253 by going to this URL: | 263 by going to this URL: |
| 254 <blockquote> | 264 <blockquote> |
| 255 <b>chrome://extensions</b> | 265 <b>chrome://extensions</b> |
| 256 </blockquote> | 266 </blockquote> |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 <li> | 333 <li> |
| 324 Click <b>OK</b>. | 334 Click <b>OK</b>. |
| 325 </li> | 335 </li> |
| 326 </ol> | 336 </ol> |
| 327 <p>If the updated extension is successfully packaged, you'll see a dialog like t
his:</p> | 337 <p>If the updated extension is successfully packaged, you'll see a dialog like t
his:</p> |
| 328 <img src="images/update-success.gif" width="298" height="160"> | 338 <img src="images/update-success.gif" width="298" height="160"> |
| 329 <h2 id="upload"> Uploading a previously packaged extension to the Chrome Web Sto
re</h2> | 339 <h2 id="upload"> Uploading a previously packaged extension to the Chrome Web Sto
re</h2> |
| 330 <p> | 340 <p> |
| 331 You can use the Chrome Developer Dashboard | 341 You can use the Chrome Developer Dashboard |
| 332 to upload an extension that you've previously packaged yourself. | 342 to upload an extension that you've previously packaged yourself. |
| 333 However, unless you take special steps, | 343 However, a new extension ID will be created |
| 334 the extension's ID in the Chrome Web Store | 344 in the Chrome Web Store. |
| 335 will be different from its ID in the package you created. | 345 You must ensure that only one extension ID is used. |
| 336 This different ID might be a problem if you've | 346 If you've already distributed your extension package, |
| 337 distributed your extension package, | 347 replace the newly created extension ID |
| 338 because it allows users to install multiple versions of your extension, | 348 with your existing extension ID. |
| 339 each with its own local data. | 349 Otherwise, users can install multiple versions |
| 350 of your extension, each with its own local data. |
| 351 If you haven't distributed your extension package, |
| 352 you can use the new extension ID, |
| 353 taking care to remove any references to the old one. |
| 340 </p> | 354 </p> |
| 341 <p> | 355 <p> |
| 342 If you want to keep the extension ID the same, | 356 To replace the newly created extension ID |
| 343 follow these steps: | 357 with your existing extension ID: |
| 344 </p> | 358 </p> |
| 345 <ol> | 359 <ol> |
| 346 <li> Rename the private key that was generated | 360 <li> Rename the private key that was generated |
| 347 when you created the <code>.crx</code> file to <code>key.pem</code>. </li> | 361 when you created the <code>.crx</code> file to <code>key.pem</code>. </li> |
| 348 <li> Put <code>key.pem</code> in the top directory | 362 <li> Put <code>key.pem</code> in the top directory |
| 349 of your extension. </li> | 363 of your extension. </li> |
| 350 <li> Compress that directory into a ZIP file. </li> | 364 <li> Compress that directory into a ZIP file. </li> |
| 351 <li> Upload the ZIP file using the | 365 <li> Upload the ZIP file using the |
| 352 <a href="https://chrome.google.com/webstore/developer/dashboard">Chrome Deve
loper Dashboard</a>. </li> | 366 <a href="https://chrome.google.com/webstore/developer/dashboard">Chrome Deve
loper Dashboard</a>. </li> |
| 353 </ol> | 367 </ol> |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 _uff=0; | 419 _uff=0; |
| 406 urchinTracker(); | 420 urchinTracker(); |
| 407 } | 421 } |
| 408 catch(e) {/* urchinTracker not available. */} | 422 catch(e) {/* urchinTracker not available. */} |
| 409 </script> | 423 </script> |
| 410 <!-- end analytics --> | 424 <!-- end analytics --> |
| 411 </div> | 425 </div> |
| 412 </div> <!-- /gc-footer --> | 426 </div> <!-- /gc-footer --> |
| 413 </div> <!-- /gc-container --> | 427 </div> <!-- /gc-container --> |
| 414 </body></html> | 428 </body></html> |
| OLD | NEW |