May Featured Add-ons

Amy Tsay

Pick of the Month: Easy Copy

Copy page details such as its title, URL and HTML source with one click and paste it anywhere, such as emails, blogs and forums. Copy a single page, all open tabs or all links on a page. Format text as plain text or HTML.

This is an excellent add-on, bringing in unlimited possibilities. It can be used for all sorts of clippings, and it brings value to other add-ons in the Firefox universe. For instance you can select some text and save it as a Zotero or Scrapbook note, all source info retained without the need to save the entire page.”

Get Easy Copy »

Also Featured

Lightweight Themes Manager
Manage your installed personas (lightweight themes). Get it now »

CookieKeeper
Extended Cookie Manager—keep only wanted cookies. Get it now »

Ecosia – The search engine that plants trees!
Ecosia is a search engine that donates 80% of its income to a tree-planting program in Brazil. By searching with Ecosia, you can help the environment for free. Get it now »

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, so there’s always an opportunity to participate. If you’re interested, please apply by Tuesday, May 6, 2014 at 23:59 PDT. More details >

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

Apply to be on the next Featured Add-ons Board

Amy Tsay

1

It’s time to choose new members for the featured add-ons board! Board members are responsible for deciding which add-ons are featured on AMO in the next six months. Downloads of featured add-ons grow exponentially in the months they are featured, so your participation really makes an impact. Also, featured add-ons help users discover what’s new and useful.

Anyone from the add-ons community is welcome to apply: power users, theme designers, developers, and evangelists. Priority will be given to applicants who have not served on the board before, followed by those from previous boards, and finally from the outgoing board. This page provides more information on the duties of a board member.

To be considered, please email us at amo-featured@mozilla.org with your name, and tell us how you’re involved with AMO. The deadline is Tuesday, May 6, 2014 at 23:59 PDT. The new board will be announced about a week after.

We look forward to hearing from you!

Add-ons Update – Week of 2014/04/16

Jorge Villalobos

12

I post these updates every 3 weeks to inform add-on developers about the status of the review queues, add-on compatibility, and other happenings in the add-ons world.

The Review Queues

  • Most nominations for full review are taking less than 3 weeks to review.
  • 148 nominations in the queue awaiting review.
  • Most updates are being reviewed within 2 weeks.
  • 118 updates in the queue awaiting review.
  • Most preliminary reviews are being reviewed within 2 weeks.
  • 142 preliminary review submissions in the queue awaiting review.

If you’re an add-on developer and would like to see add-ons reviewed faster, please consider joining us. Add-on reviewers get invited to Mozilla events and earn cool gear with their work. Visit our wiki page for more information.

Firefox 29 Compatibility (Australis!)

This is a big one. The Firefox 29 compatibility update is here, and there are some additional posts explaining some of what’s new:

As usual we recommend using the Aurora and Beta branches to test your add-ons ahead of time.

The Add-ons for Australis contest is now closed, and we have begun the judging phase. We will announce the winners on this blog in a couple of weeks. Good luck!

Add-on Compatibility for Firefox 29

Jorge Villalobos

23

Firefox 29 will be released on April 29th. Here’s the list of changes that went into this version that can affect add-on compatibility. There is more information available in Firefox 29 for Developers, so you should read that too.

Australis!

This is an actual movie

Yes, this is a joke.

This is a big one. The Australis theme introduces major changes that all add-on developers should be aware of, but it’s nowhere nearly as dramatic as initially thought. We’ve already been blogging about it extensively, so please give these articles a read if you haven’t already:

Notable changes include the removal of the add-on bar and the Firefox button on Windows, the introduction of the menu panel, and an overhaul in the toolbar customization system. Toolbars are no longer hidden for about: pages, there’s no small/large button setting anymore, and tabs are always on top.

Make sure you test your add-on extensively, paying special attention to button customization.

If you notice any problems in your add-ons related to Australis, please file a bug and add it as a dependency to one of these bugs:

  • Add-on issues. This is for add-ons that haven’t been updated yet and are visually broken in Firefox 29 and above.
  • Australis add-on bugs. Use this one if something is broken in your add-on and you believe it’s a bug in the new code.

General

XPCOM

New!

Please let me know in the comments if there’s anything missing or incorrect on these lists. If your add-on breaks on Firefox 29, I’d like to know.

The automatic compatibility validation and upgrade for add-ons on AMO will happen soon, so keep an eye on your email if you have an add-on listed on our site with its compatibility set to Firefox 28.

Changes to unsafeWindow for the Add-on SDK

wbamberg

25

In Firefox 30 the Add-on SDK is making a change to the execution environment for content scripts. While this change will not affect most add-ons, some patterns will no longer work. Specifically, content scripts will no longer be able to use unsafeWindow or window.wrappedJSObject to make JavaScript objects available to content. The more common pattern of accessing objects in the page directly via unsafeWindow will continue to work as expected.

What we’re introducing instead are some new APIs that you can use to share functions and objects with content explicitly. While you’re working on migrating to these new APIs, there’s a mechanism you can use to switch your add-on back to the old behavior as a short-term measure.

Who’s affected?

Add-on SDK-based add-ons that use unsafeWindow or window.wrappedJSObject in content scripts to share JavaScript objects with the scripts loaded by a web page will be broken by this change.

By default, content scripts and the scripts loaded into web pages are insulated from each other. They can both see the DOM, but content scripts can’t access objects defined by page scripts, and page scripts can’t access objects defined by content scripts:

// content-script.js
var button = document.getElementById("show-page-script-var");
button.addEventListener("click", function() {
  // access object defined in page script
  console.log(window.pageScriptObject.greeting);        // undefined
}, false);
 
window.contentScriptObject = {"greeting" : "hello from add-on"};
// page-script.js
var button = document.getElementById("show-content-script-var");
 
button.addEventListener("click", function() {
  // access object defined by content script
  console.log(window.contentScriptObject.greeting);     // undefined
}, false);
 
// define object to be accessed by content script
window.pageScriptObject = {"greeting" : "hello from web page"};

Sometimes a content script wants to break through this insulation, and to do that it can use unsafeWindow (or window.wrappedJSObject, which is identical):

// content-script.js
var button = document.getElementById("show-page-script-var");
button.addEventListener("click", function() {
  // access object defined in page script
  console.log(unsafeWindow.pageScriptObject.greeting);  // "hello from web page"
}, false);
 
unsafeWindow.contentScriptObject = {"greeting" : "hello from add-on"};
// page-script.js
var button = document.getElementById("show-content-script-var");
 
button.addEventListener("click", function() {
  // access object defined by content script
  console.log(window.contentScriptObject.greeting);     // "hello from add-on"
}, false);
 
window.pageScriptObject = {"greeting" : "hello from web page"};

From Firefox 30 onwards, this mechanism won’t work any more to share objects from the content script to the page script:

// content-script.js
var button = document.getElementById("show-page-script-var");
button.addEventListener("click", function() {
  // access object defined in page script
  console.log(unsafeWindow.pageScriptObject.greeting);  // "hello from web page"
}, false);
 
unsafeWindow.contentScriptObject = {"greeting" : "hello from add-on"};
unsafeWindow.contentScriptPrimitive = 42;
// page-script.js
var button = document.getElementById("show-content-script-var");
 
button.addEventListener("click", function() {
  // access primitive defined by content script
  console.log(window.contentScriptPrimitive);            // 42
  // access object defined by content script
  console.log(window.contentScriptObject.greeting);     // undefined
}, false);
 
window.pageScriptObject = {"greeting" : "hello from web page"};

Again, the use of unsafeWindow to access variables defined in the page script is unaffected, so this change is asymmetric. Content scripts can still access page objects using unsafeWindow, but not vice versa.

Also note that the content script will still be able to share primitive values with the page using unsafeWindow, just not objects.

If the page script tries to read a variable defined using unsafeWindow, it will get the value undefined. If it tries to write to such a variable, the browser will throw an exception with this message: “Permission denied to access property [name of the property]”.

The workaround

In the short term, there’s a new option in package.json called “unsafe-content-script” under the “permissions” key. By setting it to true you can revert to the old behavior:

"permissions": {
  "unsafe-content-script": true
}

However, this is only a temporary fix to enable your add-on to keep working while you update to the new APIs. We will deprecate and eventually remove this flag.

The real fix

The real fix is to use three new APIs to share objects and functions with web content: cloneInto(), exportFunction(), and createObjectIn(). All three of these functions are made available to content scripts as globals.

cloneInto()

You can use cloneInto() to clone an object from the content script’s context into the page script’s context. cloneInto() creates a structured clone of the object in the target context, and returns a reference to the clone. You can then assign that to a property of the target window, and the page script can access it:

// content-script.js
contentScriptObject = {"greeting" : "hello from add-on"};
unsafeWindow.contentScriptObject = cloneInto(contentScriptObject, unsafeWindow);
// page-script.js
var button = document.getElementById("show-content-script-var");
 
button.addEventListener("click", function() {
  // access object defined by content script
  console.log(window.contentScriptObject.greeting);     // "hello from add-on"
}, false);

You can also assign the reference to an object you’ve created using createObjectIn():

var foo = createObjectIn(unsafeWindow, {defineAs: "foo"});
var contentScriptObject = {"greeting" : "hello from add-on"};
unsafeWindow.foo.contentScriptObject = cloneInto(contentScriptObject, unsafeWindow);
// page-script.js
var button = document.getElementById("show-content-script-var");
 
button.addEventListener("click", function() {
  // access object defined by content script
  console.log(window.foo.contentScriptObject.greeting); // "hello from add-on"
}, false);

exportFunction()

You can use exportFunction() to expose a function from a content script to a page script. In this way a function defined in a content script can be called by the page script. Any non-native arguments, and the return value, are cloned into the page script’s context.

You can export the function to the target’s window object:

// content-script.js
var salutation = "hello, ";
function greetme(user) {
  return salutation + user;
}
 
exportFunction(greetme, unsafeWindow, {defineAs: "greetme"});
// page-script.js
var button = document.getElementById("call-content-script-function");
 
button.addEventListener("click", function() {
  console.log(window.greetme("page script"));           // "hello, page script"
}, false);

You can also export the function to an object you’ve created in the page context using createObjectIn(). This code creates a new object in the page’s context called foo, and attaches the greetme() function to that object:

// content-script.js
var salutation = "hello, ";
function greetme(user) {
  return salutation + user;
}
 
var foo = createObjectIn(unsafeWindow, {defineAs: "foo"});
exportFunction(greetme, foo, {defineAs: "greetme"});
// page-script.js
var button = document.getElementById("call-content-script-function");
 
button.addEventListener("click", function() {
  console.log(window.foo.greetme("page script"));
}, false);

createObjectIn()

You can use createObjectIn() to create a new object in the page script’s context. You can then export objects and functions to that object, instead of the target scope’s global window. See the previous sections for some examples of this.

Structured cloning

These functions use the structured clone algorithm to clone objects into the page context. This is more capable than JSON serialization, but still has some serious limitations. Most notably, you can’t clone functions, so you can’t export functions that take functions as arguments (such as callbacks) and functions that return functions. However, we’re working on adding better support at least for common patterns like callbacks.

More details

To learn more about the new APIs see the reference documentation:

If you have any questions, please ask in the Jetpack mailing list or the #jetpack channel on irc.mozilla.org.

Add-on Debugger now in Firefox Nightly

Dave Townsend

16

Since the dawn of Firefox debugging add-ons has been a task fraught with peril. The old JavaScript Debugger existed but hasn’t received the care and attention it needed. Most of us resorted to logging with dump statements to try to figure out why things were going wrong.

That is going to change. Recently landed in Firefox Nightly is the new Add-on Debugger. A full JavaScript debugger targeted at add-ons. It behaves like the developer tools debugger for webpages and the browser toolbox but will show the scripts that your add-on uses to make it easy to find where things are going wrong.

The feature is still experimental and we need your help to make it shippable. To use it you need to turn on two options. Open the developer tools, go to the settings and enable chrome debugging and remote debugging. Once they are on you can find debug buttons for add-ons in the Add-ons Manager. We support debugging any restartless add-on, older style add-ons won’t be supported for now. We want to focus on making the experience as awesome as possible for the newer style.

When the debugger opens you’ll see a list of all the scripts from your add-on that are currently in use. If your add-on uses the Add-on SDK then the modules you use will show up in their own section as well. As you might expect you can set breakpoints and step through code. You won’t see all of your code immediately, only scripts that are in use. When new code is loaded it should show up. We’ve put together a short screencast showing enabling the debugger and a few things you can do with it:

Many thanks to our intern on the SDK team last year, Mike Hordecki, for doing the bulk of this work assisted by Eddy Bruel. Also thanks to Jordan Santell for getting it landed.

As I said we need your help to make this better. Please file bugs anywhere you see problems, either scripts not appearing in the debugger that you expect to be there or being unable to use the debugger properly. For now the debugger is the only part of the toolbox that you’ll see. In the future we want to add an add-on specific console as well as start showing the other developer tools where they make sense for add-on developers. Let us know what you want to see either in comments here or by filing bug reports in the Firefox Developer Tools Debugger component.

April Featured Add-ons

Amy Tsay

11

Pick of the Month: S3.Download Statusbar

View and manage downloads from a tidy statusbar. Despite its compact size, S3. Download Statusbar packs in more useful features than the standard download window. The fully customizable interface auto-hides when not in use, allowing full control without interruption.

Great add-on, a must have. The checksum verification is a blessing. Also thanks for good and fast support!”

Get S3.Download Statusbar »

125114

Featured Complete Theme

FT GraphiteGlow
Smooth graphite theme for Firefox. Get it now »

116878

Also Featured

Web2PDF Converter
Convert web pages into PDF files directly from your browser. Get it now »

Free Memory
An add-on to perform free-memory operations without visiting about:memory. Get it now »

Redirect Cleaner
Cleans up redirects from links. Get it now »

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, so there’s always an opportunity to participate. If you’re interested, please follow this blog and look out for invitations that we send out every six months.

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

Announcing Add-on SDK 1.16!

Jeff Griffiths

7

I’m pleased to announce the immediate availability of Add-on SDK 1.16! You can download the SDK directly in either zip or tarball format. This is a minor release meant to provide compatibility with Firefox 29 and a smooth development experience when using the new Australis UI apis I featured in my previous post. In addition, this new release fixes the following issues:

  • Bug 944951 – “bootstrap.js must remove the added resource: URIs on unload”
  • Bug 958609 – “Add-on SDK 1.15 incompatible with Python 2.7.6″
  • Bug 963401 – “Console is flooded with javascript strict warnings” sorry for any confusion, this change did not make it to release.

The AMO validator tool is scheduled to be updated to support extensions created with SDK 1.16 next Tuesday April 1st (no, really). As always, we’d love to hear from you about your experiences with this release. You can contact us in a variety of ways:

post to our discussion group
chat with us on irc.mozilla.org #jetpack
report a bug
check out the source and contribute bug fixes, enhancements, or documentation

For more information on the Jetpack Project check out our wiki.

Add-ons Update – Week of 2014/03/26

Jorge Villalobos

3

I post these updates every 3 weeks to inform add-on developers about the status of the review queues, add-on compatibility, and other happenings in the add-ons world.

The Review Queues

  • Most nominations for full review are taking less than 2 weeks to review.
  • 77 nominations in the queue awaiting review.
  • Most updates are being reviewed within 10 days.
  • 65 updates in the queue awaiting review.
  • Most preliminary reviews are being reviewed within 1 week.
  • 83 preliminary review submissions in the queue awaiting review.

If you’re an add-on developer and would like to see add-ons reviewed faster, please consider joining us. Add-on reviewers get invited to Mozilla events and earn cool gear with their work. Visit our wiki page for more information.

Firefox 28 Compatibility

The add-on compatibility update for Firefox 28 is up, and the compatibility bump for AMO add-ons was run.

Firefox 29 Compatibility (Australis!)

This is a big one. The add-on compatibility update post is still pending, but we already have a few posts explaining some of what’s new:

More on this coming up. As usual we recommend using the Aurora and Beta branches to test your add-ons ahead of time.

Finally, we’re running a contest! If you’re an extension or complete theme developer, we have 3 categories you can compete in to win a Firefox OS phone and other goodies. Please visit the contest page for more information.