Weekend Project: Planet View Extension in FireFox

One of my favorite plugins for Google Chrome was the Planet View extension from Planet (formerly known as Planet Labs). This plugin changes the new-tab behavior in chrome to display a beautiful picture of the Earth from one of Planet’s orbital assets (SkySats, Doves, and Rapideye) in the new tab along with a short description of the image. Also, if you click the small globe in the corner, the image would change.

However, a while back, I have switched to using Firefox as my primary browser. So I haven’t had these nice images to view.

Before, I wondered how hard it would be to port the plugin to Firefox given that extensions for Firefox and Chrome can be code-compatible.

As it turned out, it wasn’t difficult at all.

So for those that have developed extensions for Chrome and Firefox, this will be totally unsurprising and uninteresting. But, it was fun for me, having never looked into extension development before. And it only took me about an hour of tinkering to get it working. Below I detailed the steps I followed, and I’ve posted a WIP PR (work in progress pull request) to the Github repository for the chrome extension to point out how easy it was to get it working.

In any case, I am back to having beautiful new tabs!

Steps

The first step was to get the source code for the extension, which is available on Github.

Okay, that was easy… So I follow the readme to produce a zip archive of the built extension.

Next, I used Firefox to install the plugin from the archive file as a temporary plugin. This step revealed an error in the manifest file related to the “incognito” parameter not being supported in Firefox.

Employing the methodology of “changing things and seeing what happens”, I fixed the issue by changing the mode from “split” to “not_allowed”. Although I don’t know why Firefox would not implement “split”, or at least allow to override to prevent it from breaking extensions (possibly discussed in detail here).

After that, the extension installed. Everything worked.

I then followed some steps to make an account at Mozilla to get the extension signed. This allowed me to sign the extension so I could install it permanently.

Avatar
Andrew M. Annex
Ph.D. Candidate

My research interests include the applications of deep learning to planetary geology.