How it came to be
I find myself often having tasks for the websites I’m currently on. Be it for wiki pages I’m supposed to edit at a later point or other people’s JIRA tickets I want to comment on. As my colleagues might confirm, I suck at keeping something like that in my mind for more than 5 minutes. So as an avid 2Do user I started creating tasks for myself in 2Do. Usually by copy and pasting URLs from my browser (Firefox) to 2Do.
Doing this manually, over and over again on my Mac feels especially annoying since you can do this with the Share-Sheet directly on iOS. Turns out you can do the same from the macOS Safari, but I won’t switch browser because of this. So I gave myself a go at Firefox extensions.
Quite quickly — thanks to x-callback-url (2Do documentation) — I was able to quickly hack together my first public Firefox Add-on “Add to 2Do” (Sources are at mkleucker/firefox-2do-extension) and submitted it to addons.mozilla.org. After a first rejection due to unnecessary files being part of the packaged extension, I was quickly able to get it live.
A special thanks goes out to the creator of 2Do who allowed me to use the official 2Do icon in a grayscale version as icon for the add-on.
So what does the add-on do for now? It will create a new task in 2Do (in the Inbox) where the title is the title of the current tab. The URL will be added to the note-field, as will be any selected text.
Pretty straight forward for now. But I’m looking to improve it further. Feel free to add feature requests as issues on Github.
Developing an add-on for Firefox
Actually I have created a Firefox add-on before, but just for the private usage in a study for my Master Thesis. And that was a few years ago. So coming back to this, a lot has changed: Currently Firefox is trying to also support Chrome’s extension format. This will make it very easy to have your extension in both browsers with only a bit additional work. Yet the current version of my extension is built on the current Add-on SDK, which has matured since I used it last.
Will there be a Chrome extension?
I already made a small announcement that I’m working on Chrome version as well. I also do have a first proof-of-concept running locally. But I want to move the Firefox extension over to the WebExtension first, so both add-ons / extension can share the better part of the code. I hope to keep the maintenance low that way.
Also I came across a similar Chrome extension, pepelsbey/add-to-things, which offers the same functionality for Things. It seems that I can learn a bit from it for when converting to the WebExtension format.