New Contributions launched on AMO

The contributions feature was launched over 8 years ago to give developers an easy way to receive compensation for their add-ons on AMO (addons.mozilla.org). This system relied on an integration with the PayPal API, which often caused problems. It didn’t work properly for users with restricted cookie settings, for instance. It also meant PayPal was the only payment provider.

We just launched a new contributions system that is simpler, more reliable, and flexible to use.

New Contributions

With the new system, developers specify a contributions URL in the Developer Hub. The Contribute button on their listing page will point to that URL and open it in a new tab. Initially, we will be supporting Patreon, PayPal, and Micropayment as payment providers. If you’re a developer and would like to propose other services for inclusion, please add your feedback to this forum thread.

Legacy Add-on Support on Firefox ESR

Earlier this year, we shared with you our compatibility plan for Firefox. As anticipated, Firefox 57 will be released in late November, only allowing add-ons using the WebExtensions API. However, we have received some questions from developers on how this timeline applies to the Firefox Extended Support Release (ESR).

To clarify how legacy extensions will work with the ESR release:

  • ESR 52 will be the last ESR release that supports legacy add-ons. Support for ESR 52 officially ends on June 2018.
  • The following ESR release (59), and any subsequent release, will not support legacy add-ons. There will be no override provided for this behavior.

AMO Support

AMO (addons.mozilla.org) will continue to support legacy add-on listings throughout the ESR 52 cycle. However, AMO will primarily focus on WebExtension add-on listings. This means some legacy features may also change during this time period. There are big changes coming to AMO, including a completely new design. Stay put for more updates on this.

October’s Featured Extensions

Firefox Logo on blue background

Pick of the Month: Tab Center Redux

by Edouard Oger
Move your tabs to the side of the browser window.

“Second only to an adblocker in my must-have extensions.”

Featured: IMGoogle Reverse Image Search

by erosman
A very streamlined and effective image search tool.

“Thank you so much. Perfect add-on!”

Featured: Tab2QR

by James Shih
Send the desktop web page you’re viewing to your mobile device.

“I would say it’s the best extension of this kind.”

Featured: Video Speed Controller

by codebicycle
Speed up, slow down, fast forward and rewind HTML5 video with the help of quick shortcuts.

“I love it. Helps me save hours and hours of time, works great.”

Featured: YouTube in HD

by James Fray
Watch videos in full high-def.

“YouTube often selected 720p or sometimes lower settings, even on a 100mbit connection with a 1440p panel, so I kept having to manually select the quality with every video, but now I don’t have to! :).”

Nominate your favorite add-ons

Featured add-ons are selected by a community board made up of add-on developers, users, and fans. Board members change every six months. Here’s further information on AMO’s featured content policies.

If you’d like to nominate an add-on for featuring, please send it to amo-featured [at] mozilla [dot] org for the board’s consideration. We welcome you to submit your own add-on!

WebExtensions in Firefox 57

Firefox 57 has reached Beta, and a bevy of new APIs and improvements have landed that will put us in a good place for the Firefox Quantum launch in November.

Legacy add-ons no longer load in Firefox 57, but there is still time to migrate (almost 5,000 have migrated so far!), and you can do so even after it lands in release. Just update your listing with the new code and your users will automatically update to the compatible version. When you do, be sure to tell them about it.

Documentation for the APIs discussed here can be found on MDN Web Docs.

API changes

Tabs and Sessions APIs

Tabs now have a discarded state added to the Tab object. It will be set to true if the tab is not loaded with content, for example when restored from a previous session. This is part of getting ready for a tabs.discard API.

The tabs.opener API has now been implemented which means that openerTabId is available to the update and create methods and on the Tab object. This allows extensions to track the opener of tabs.

Also, the tabs API can now open URLs that are view-source: links and do a “load replace” which changes the page and replaces the current history so that the back button is unaffected.

The session API now has some APIs for setting, getting and removing data on a per tab or per window basis. This allows information about tabs or windows to survive session restores without the data needing to be stored by individual extensions.

webRequest API

The webRequest details object now includes proxy information. This proxy information will let webRequest listeners determine how the request interacted with a proxy.

A major new API for webRequest is now available which allows an extension to filter the HTTP response bodies as they come in. The code below alters the text on example.com. You could do this through a content script, but being able to alter the HTTP response body gives a whole new set of possibilities:

function listener(details) {
 let filter = browser.webRequest.filterResponseData(details.requestId);
 let decoder = new TextDecoder("utf-8");
 let encoder = new TextEncoder();

 filter.ondata = event => {
    let str = decoder.decode(event.data, {stream: true});
    str = str.replace(/Example/g, 'WebExtension Example');
    filter.write(encoder.encode(str));
    filter.disconnect();
 }

 return {};
}

browser.webRequest.onBeforeRequest.addListener(
 listener,
 {urls: ["https://example.com/*"], types: ["main_frame"]},
 ["blocking"]
);

Storage API

A basic implementation of chrome.storage.managed has landed. This allows administrators or other applications to configure extensions for users. In Firefox you can place a JSON file in a directory, just like for native messaging. For example, a file called favourite-colour-examples@mozilla.org.json could be placed in the appropriate place:

{
 "name": "favourite-colour-examples@mozilla.org",
 "description": "ignored",
 "type": "storage",
 "data": {
    "colour": "blue!"
 }
}

Then in the favourite-colour-examples@mozilla.org extension:

 browser.storage.managed.get('colour').then((colour) => {
   console.log(colour);
 });

Would output “blue!”.

Clipboard API

A new clipboard API has been added to allow the copying of images to the clipboard. The clipboard.setImageData allows you to populate the clipboard with image data. This API is compatible with the Chrome apps API, but at this point it should be considered experimental. This API requires the clipboardWrite permission.

Developer Tools API

The developer tools gained the panels.elements.createSidebarPane API and a panels.elements sidebar.setExpression method. This lets extensions create sidebars in the developer tools. Here’s an example extension that parses jQuery variables:

Find API

A find API has landed in Firefox. This allows extensions to call the Firefox find API on a tab and get information about the results. It can then add or remove syntax highlighting from that tab, based on the previous search.

This example extension uses the API to search across multiple tabs and highlights them:

Miscellaneous changes

Android

There have been multiple bugs fixed to ensure that pageActions and browserActions work well on Android. There has been multiple options_ui fixes and some additions. The runtime.openOptionsPage API has been added, and for those pages the activeTab permission takes effect. The browser_action.default_popup manifest property along with setPopup and getPopup has been added.

Firefox for Android now has support for installation permission prompts from the user, closely matching Desktop. When a user installs an add-on, they will be given a permission prompt.

Here’s an example when installing uBlock Origin:

If an extension chooses not to use installation permissions, the optional permission prompts have also been implemented which enable permission prompts at runtime.

Startup check

Firefox has had a brief compatibility check that occurs each time Firefox upgrades a major release. Because there are some extension that might update from legacy extensions sometime after Firefox 57 is released, we wanted to ensure that we could update users to new WebExtensions version when we can.

We took the opportunity to streamline this. The new check is quick and will only occur each time you upgrade to a major version (for example 56 to 57) and have legacy extensions:

User notification

There’s an ongoing project to show Firefox users what changes extensions make to their browser. Often it’s not clear to a user what an extension has done. It can be especially confusing if a user forgets what extensions are installed and finds changes they don’t understand later on.

An API was added that allows extensions to read the home page and new page values so extensions can tell if a user or another extension has changed the values. Along with this API, we’re now surfacing changes through to the about:preferences pages. If an extension uses the provided APIs to change: the home page, the new tab or contextual identities in Firefox 57, then a message will displayed to the user.

Here’s an example where an extension changes the home page:

An example where an extension enables contextual identities:

Long running scripts in an extension will now generate a warning that mentions the extension name, so users can choose what to do with extensions that might be taking a long time.

If an extension changes the new tab through the API, the URL bar will be empty when the new tab page is opened. This allows keyboard users to quickly navigate to new URLs. We’ve also fixed a bug where the identity was not shown in the URL bar for new tabs.

Over the coming releases we plan to add in more information into about:preferences for more and more APIs.

Contributors

Thank you once again to our many contributors for this release, especially our volunteers including: Adam Hillier, angelsl, dw-dev, Jan Henning, Kevin Jones, Lee Bousfield, Tomislav Jovanovic and Tushar Saini. This release marked a record 171 bugs fixed.

Extension review wait times are about to get much shorter

One the of the main advantages of the new WebExtensions API is that it is less likely to cause security or stability problems for users. This means we can review these add-ons faster, and we have adapted our review flow accordingly. For the past few months we have reduced review wait times for add-ons written using the WebExtensions API. Today we’re taking another big step in that direction.

Add-ons built on the WebExtensions API will now be automatically reviewed. This means we will publish add-ons shortly after uploading. Human reviewers will look at these pre-approved add-ons, prioritized on various risk factors that are calculated from the add-on’s codebase and other metadata. This change is now live, and we plan to continue augmenting it in the coming months.

These changes give developers a much improved upload and publishing experience, but also comes with more responsibility on their end. Issues that arise during review can still lead to rejection of a version or a whole listing. This will now happen after publication, rather than before. We’re in the process of editing a new Review Policy that will make the rules, exceptions, and consequences clearer for everyone.

Add-ons Update – 2017/09

Here’s your monthly add-ons update.

The Review Queues

In the past month, our team reviewed 2,490 listed add-on submissions:

  • 2,074 in fewer than 5 days (83%).
  • 89 between 5 and 10 days (4%).
  • 327 after more than 10 days (13%).

244 listed add-ons are awaiting review.

If you’re an add-on developer and are looking for contribution opportunities, please consider joining us. Visit our wiki page for more information.

Compatibility Update

We published the blog post for 56 and the bulk validation has been run. This is the last one of these we’ll do, since compatibility is a much smaller problem with the WebExtensions API.

Firefox 57 is now on the Nightly channel and will soon hit Beta, only accepting WebExtension add-ons by default. Here are some changes we’re implementing on AMO to ease the transition to 57.

Recognition

We would like to thank the following people for their recent contributions to the add-ons world:

  • Amola Singh
  • yfdyh000
  • bfred-it
  • Tiago Morais Morgado
  • Divya Rani
  • angelsl
  • Tim Nguyen
  • Atique Ahmed Ziad
  • Apoorva Pandey
  • Kevin Jones
  • ljbousfield
  • asamuzaK
  • Rob Wu
  • Tushar Sinai
  • Trishul Goel
  • zombie
  • tmm88
  • Christophe Villeneuve
  • Hemanth Kumar Veeranki

You can read more about their work in our recognition page.

Last chance to migrate your legacy user data

If you are working on transitioning your add-on to use the WebExtensions API, you have until about mid-October (a month before Firefox 57 lands to allow time for testing and migrating), to port your legacy user data using an Embedded WebExtension.

This is an important step in giving your users a smooth transition because they can retain their custom settings and preferences when they update to your WebExtensions version. After Firefox 57 reaches the release channel on November 13, you will no longer be able to port your legacy data.

If you release your WebExtensions version after the release of Firefox 57, your add-on will be enabled again for your users and they will still keep their settings if you port the data beforehand. This is because WebExtensions APIs cannot read legacy user settings, and legacy add-ons are disabled in Firefox 57. In other words, even if your WebExtensions version won’t be ready until after Firefox 57, you should still publish an Embedded WebExtension before Firefox 57 in order to retain user data.

When updating to your new version, we encourage you to adopt these best practices to ensure a smooth transition for your users.

Tell your users what to expect in your WebExtensions version

The migration to WebExtensions APIs is picking up steam, with thousands of compatible add-ons now available on addons.mozilla.org (AMO). To ensure a good experience for the growing number of users whose legacy add-ons have been updated to WebExtensions versions, we’re encouraging developers to adopt the following best practices.

(If your new version has the same features and settings as your legacy version, your users should get a seamless transition once you update your listing, and you can safely ignore the rest of this post.)

If your new version has different features, is missing legacy features, or requires additional steps to recover custom settings, please do one or both of the following.

Update your AMO listing description

If your new version did not migrate with all of its legacy features intact, or has different features, please let your users know in the “About this Add-on” section of your listing.

If your add-on is losing some of its legacy features, let your users know if it’s because they aren’t possible with the WebExtensions API, or if you are waiting on bug fixes or new APIs to land before you can provide them. Include links to those bugs, and feel free to send people to the forum to ask about the status of bug fixes and new APIs.

Retaining your users’ settings after upgrade makes for a much better experience, and there’s still time to do it using Embedded WebExtensions. But if this is not possible for you and there is a way to recover them after upgrade, please include instructions on how to do that, and refer to them in the Version notes. Otherwise, let your users know which settings and preferences cannot be recovered.

Add an announcement with your update

If your new version is vastly different from your legacy version, consider showing a new tab to your users when they first get the update. It can be the same information you provide in your listing, but it will be more noticeable if your users don’t have to go to your listing page to see it. Be sure to show it only on the first update so it doesn’t annoy your users.

To do this, you can use the runtime.onInstalled API which can tell you when an update or install occurs:

function update(details) {

if (details.reason === 'install' || details.reason === 'update') {

browser.tabs.create({url: 'update-notes.html'});

}

}

browser.runtime.onInstalled.addListener(update);

This will open the page update-notes.html in the extension when the install occurs. For example:

For greater control, the runtime.onInstalled event also lets you know when the user updated and what their previous version was so you can tailor your release notes.

Thank you

A big thanks to all the developers who have put in the effort to migrate to the WebExtensions API. We are here to support you, so please reach out if you need help.

September’s Featured Extensions

Firefox Logo on blue background

Pick of the Month: Search Image

by Didier Lafleur
Highlight any text and perform a Google image search with a couple clicks.

“I’ve been looking for something like this for years, to the point I wrote my own script. This WORKS for me.”

Featured: Cookie AutoDelete

by Kenny Do
Automatically delete stagnant cookies from your closed tabs. Offers whitelist capability, as well.

“Very good replacement for Self-Destructing Cookies.”

Featured: Tomato Clock

by Samuel Jun
A super simple but effective time management tool. Use Tomato Clock to break your work bursts into meaningful 25-minute “tomato” intervals.

“A nice way to track my productivity for the day.”

Featured: Country Flags & IP Whois

by Andy Portmen
This extension will display the country flag of a website’s server location. Simple, informative.

“It does what it should.”

Nominate your favorite add-ons

Featured add-ons are selected by a community board made up of add-on developers, users, and fans. Board members change every six months. Here’s further information on AMO’s featured content policies.

If you’d like to nominate an add-on for featuring, please send it to amo-featured [at] mozilla [dot] org for the board’s consideration. We welcome you to submit your own add-on!

Add-ons Update – 2017/08

Here’s the monthly update of the state of the add-ons world.

The Review Queues

In the past month, our team reviewed 1,803 listed add-on submissions:

  • 1368 in fewer than 5 days (76%).
  • 147 between 5 and 10 days (8%).
  • 288 after more than 10 days (16%).

274 listed add-ons are awaiting review.

If you’re an add-on developer and are looking for contribution opportunities, please consider joining us. Visit our wiki page for more information.

Compatibility Update

We published the blog post for 56 and the bulk validation has been run. This is the last one of these we’ll do, since compatibility is a much smaller problem with the WebExtensions API.

Firefox 57 is now on the Nightly channel, and only accepting WebExtension add-ons by default. Here are some changes we’re implementing on AMO to ease the transition to 57.

We recommend that you test your add-ons on Beta. If you’re an add-ons user, you can install the Add-on Compatibility Reporter. It helps you identify and report any add-ons that aren’t working anymore.

Recognition

We would like to thank the following people for their recent contributions to the add-ons world:

  • Apoorva Pandey
  • Neha Tekriwal
  • Swapnesh Kumar Sahoo
  • rctgamer3
  • Tushar Saini
  • vishal-chitnis
  • Cameron Kaiser
  • zombie
  • Trishul Goel
  • Krzysztof Modras
  • Tushar Saini
  • Tim Nguyen
  • Richard Marti
  • Christophe Villeneuve
  • Jan Henning
  • Leni Mutungi
  • dw-dev
  • Dino Herbert

You can read more about their work in our recognition page.