Announcing Jetpack 0.6

We are happy to announce the release of Jetpack 0.6. Jetpack is a Mozilla Labs project which makes it possible for anyone who knows standard web skills (HTML, Javascript, CSS) to make Firefox add-ons.

Jetpack 0.6 adds two major APIs to the arsenal: a secure preferences system and the ability to add and modify menus. With these new APIs — and the numerous bug fixes since the last release — we hope to see even more innovative Jetpacks in addition to the hundreds already written.

Menu

An important part of many add-ons is creating menu items — both at a system level and for context menus. In Jetpack 0.6, we’ve tried to make this painless.

Jetpack Menu API Tutorial

For example, adding an item to the Tool’s menu requires just one line of code:

jetpack.menu.add("Hello World!");

For a fully useful example, check out the Pixlr Image Editor Jetpack, which lets you edit any photo you find on the web with a right-click.

If you want to dive in, you can read the Menu API documentation.

Settings

Most Jetpacks require a couple of persistent settings, like user names, passwords, and preferences. The Settings API tries to be unobtrusive — you tell Jetpack what kind of settings you want and Jetpack takes care of the interface.

For example, include the following code for settings in your Jetpack:

var manifest = {
  settings: [
    {name:"username", type:"text", label:"Username"},
    {name:"music", type:"boolean", label:"Music", default: true },
    {name:"volume", type:"range", label:"Volume", min: 0, max: 10, default: 5 }
  ]
};

Jetpack will automatically build a UI for it:

And your Jetpack will be able to access the settings via:

jetpack.storage.settings.username
jetpack.storage.settings.music
jetpack.storage.settings.volume

This is a first iteration of a settings implementation, more will be coming soon. For more details, read the Settings API proposal document.

Download

If you already have Jetpack installed, update to 0.6 via the “Find Updates” button in the add-ons manager. If you’re new to Jetpack, you can get Jetpack automatically by installing any Jetpacks or by downloading it directly from addons.mozilla.org.

Participate

Mozilla Labs is a virtual lab where people come together online to create, experiment and play with Web innovations for the public benefit. There are many ways to join the team and get involved:

– Aza Raskin, Atul Varma, Daniel Buchner, and Nick Nguyen on behalf of the Jetpack development team.

3 Responses to “Announcing Jetpack 0.6”

  1. [...] on the tail of a major update to Jetpack, Mozilla Labs is proud to announce the launch of the Jetpack Gallery. The gallery makes [...]

  2. [...] on the tail of a major update to Jetpack, Mozilla Labs is proud to announce the launch of the Jetpack Gallery. The gallery makes [...]

  3. Serge says:

    Perfect, this is a lovely addition.
    The settings are important for our little jetpack apps.

    Would it use embedded sqllite db in the future? So that the offline data can be available.

    Super

Leave a Reply

Spam Protection by WP-SpamFree

About Mozilla Labs

Laboratories are where science and creativity meet to develop, research, and explore new ideas. Mozilla Labs embraces this great tradition - a virtual lab where people come together to create, experiment, and play with new Web innovations and technologies.

Newsletter

Enter your email address here to subscribe to our mailing list for announcements: