canmove, Confirmed users
737
edits
("WebExtensions add-on" -> "WebExtension") |
|||
Line 19: | Line 19: | ||
** double-click the preference, or right-click and selected "Toggle", to set it to <code>false</code>. | ** double-click the preference, or right-click and selected "Toggle", to set it to <code>false</code>. | ||
===Example | ===Example WebExtension=== | ||
To help get you started, we've created a very simple example | To help get you started, we've created a very simple example WebExtension at https://github.com/mdn/webextensions-examples. Clone this repo and navigate to the "borderify" directory. | ||
git clone https://github.com/mdn/webextensions-examples | git clone https://github.com/mdn/webextensions-examples | ||
Line 28: | Line 28: | ||
====manifest.json==== | ====manifest.json==== | ||
Every | Every WebExtension must contain a <code>manifest.json</code> file. This one looks like: | ||
{ | { | ||
Line 62: | Line 62: | ||
===Packaging=== | ===Packaging=== | ||
Firefox | Firefox add-ons are packaged as XPI files, which are just ZIP files with an "xpi" extension. | ||
One trick is that the ZIP file must be a ZIP of the files in the add-on, not of the containing directory. So to create an XPI from the borderify files, at the command prompt type, from inside the `borderify` directory, type: | One trick is that the ZIP file must be a ZIP of the files in the add-on, not of the containing directory. So to create an XPI from the borderify files, at the command prompt type, from inside the `borderify` directory, type: |