Introducing Link Text and Location Copier, My First Firefox Add-on

Link Text and Location Copier, my first Firefox add-on, has officially been published. It allows you to easily copy the text and URL of a link (or the page title and URL) from the context menu. Right click a link, select the appropriate formatting (plain text, HTML, Markdown or BB Code) and paste it wherever you like. Who needs social widgets if you got an add-on like this?

I made this add-on because one of my favorite and most used add-ons, CoLT, will stop working with the release of Firefox 57 on November 14. In that version, support for XPCOM-based add-ons will be completely removed, in favor of WebExtentions, a new(ish) cross-browser system. Basically, WebExtentions are bunch of Javascript that may use privileged APIs, all zipped up.

So I thought, “It’s all javascript, so how hard can it be?”, cracked open a text-editor, and lo-and-behold, some hours later I had a working version. I githubbed the code, submitted the add-on for review, and before I even saw the approval e-mail or got the change to announce it to the world, there was already a five star review and a bug report waiting for me.

(Full disclosure: I tested the add-on in the Developer Edition of Firefox. So I was quite surprised that the text of the link always returns ‘undefined’ in the current stable release, Firefox 55. As it turns out, the contextMenu.OnClickData.linkText property was added in Firefox 56. #oops)

I have got two more things left on the roadmap: internationalization (translations), and customization (add your own formats). After that, I might even see if I can get it to work in all other browsers that use WebExtentions (Chrome, Opera, Edge).

Install Link Text and Location Copier from addons.mozilla.org.
Report bugs on GitHub. Feature and pull requests are also appreciated.