“Amp

Compete in the “Amp Your Firefox” Add-ons Contest

People love their add-ons—85% of Firefox users have them installed, and there have been over 3 billion downloads since they revolutionized browsing in 2004. There are add-ons for almost everything under the sun: fun, productivity, personalization, even for making tea. Between June 13 – July 18, 2013, we challenge you to delight these fans by creating or updating add-ons that amp up their Firefox.

We’re also challenging you on the mobile front—with more than 10 million people using Firefox for Android, this is your chance to take the fun and personalization of add-ons to a fast-growing and passionate fan base.

A panel of judges will pick the best add-on from each prize category, and the community will choose which category winner is the best overall add-on. Category winners will receive Android tablets, and the Best Overall winner will receive an 11-inch Macbook Air. All participants whose entry is approved (fully reviewed) for AMO will receive “Amp Your Firefox” t-shirts! The winning add-ons will also get tons of exposure on AMO and other Mozilla properties.

The Categories

Best Mobile Add-on

Create add-ons that take Firefox for Android to the next level for over 10 million users by improving readability, enhancing the web experience across devices, and rounding out browsing features—get creative!

Best Mobile Add-on Port

If you’ve created an add-on for desktop and think it would be great for a mobile audience, port it over to Firefox for Android!

Best Game Add-on

It takes creativity and imagination to make a great game add-on like Cheevos or Destroy the Web—are you up for taking the challenge?

Best Complete Theme

Complete themes can dramatically change the look of your Firefox—everything from buttons, window frames, tabs, and menus can be customized—the sky’s the limit. Create complete themes that are both aesthetically pleasing and transform the appearance of Firefox.

Best Updated Add-on

If you’ve created an add-on and want to freshen it up by adding new features, making it restartless, or porting it to the SDK, this is the category for you.

Mobile Next!

One of the key categories we’re excited about for this competition is Mobile. Firefox for Android has done incredibly well in terms of user uptake and reviews in the Play marketplace, and the Android and Jetpack teams have both been working hard to make developing Add-ons for Mobile Firefox as easy as possible. Having said that, developing mobile add-ons is different enough that we thought we’d call out some of the highlights.

NativeWindow & BrowserApp

NativeWindow and BrowserApp are privileged JavaScript APIs that allow developers to add their own custom functionality to the Native Java UI that is used on Firefox for Android instead of XUL. BrowserApp provides add-on developers the ability to interact with mobile browser tabs. NativeWindow allows developers to add menu items to the main and context menus, and to trigger native notifications.

Mark Finkle has created a handy github repo that includes all of the boilerplate code you’ll need to get started. Using this restartless add-on skeleton as the basis for your work, NativeWindow and BrowserApp are easy to access as properties off of the window object:

// show a toast immediately
aWindow.NativeWindow.toast.show("Showing you a toast", "short");
 
// add a menu item that shows a toast when clicked
let menuId = aWindow.NativeWindow.menu.add(“Hello!, icon, function() {
    aWindow.NativeWindow.toast.show("I ran the callback!", "short");
});

Jetpack – mobile ready

If you’re more comfortable with the Add-on SDK, I’m happy to report that the Jetpack team has done a lot of work to support mobile development. Most ( but not all ) Jetpack APIs work on Mobile, and the cfx command-line tool has been enhanced to be able to easily push your add-on onto the device for testing.

It is relatively simple to use NativeWindow from a Jetpack-based add-on:

// get the most recent window
const utils = require('api-utils/window/utils');
const recent = utils.getMostRecentBrowserWindow();
 
// show a toast notification
recent.NativeWindow.toast.show(opts.message, duration);
 
// listen for tabs events
let tabs = require('tabs');
tabs.on('ready', function(tab) {
    console.log(recent.BrowserApp.selectedTab.id, tabs.activeTab.id);
});

Caveats

Mobile phones present unique challenges for web browsers like Firefox mobile, so there are some very real limitations on what you can do with extensions as compared to desktop Firefox:

  • Add-on Builder does not support packaging or running extensions on a phone
  • Firefox for Android does not support XUL overlays
  • not all of the Add-on SDK’s modules are compatible with Firefox for Android, please consult this compatibility guide for more information.

For even more detail on using the NativeWindow api and Jetpack for hacking on mobile extensions, see the Jetpack, Fennec and NativeWindow blog post in the Mozilla Add-ons blog.

Get going!

Have fun, and good luck!

View full post on Mozilla Hacks – the Web developer blog

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)