This Web Extension for Firefox allows you to shorten URLs using your own YOURLS instance. This is a rebuild of the first version, which uses legacy Firefox techniques that are not supported anymore.

YOURLS is an URL shortener, just like bit.ly or goo.gl, but it is open source and you can install your own private instance. Thus, you can diminish the tracking of these big platforms ;-)

This extension integrates into to the UI of Firefox to quickly shorten the URL of a website you visiting. All you need is a Firefox and an installation of YOURLS. You can also find this plugin at Mozillas addon service platform.

Integration

The YOURLS extension integrates into Firefox as a toolbar button. Once it’s clicked you will see a popup with some options to shorten the current page’s URL:

Through a popup window you can shorten the current URL. It shows the original (source) version and you may provide a keyword. A click on 'shorten' sends the job to your YOURLS server and shows you the resulting short URL in the lower text field. The result can be copied to the clipboard. Two more buttons provide quick access to the extension's settings page and the YOURLS admin interface.
Through a popup window you can shorten the current URL. It shows the original (source) version and you may provide a keyword. A click on 'shorten' sends the job to your YOURLS server and shows you the resulting short URL in the lower text field. The result can be copied to the clipboard. Two more buttons provide quick access to the extension's settings page and the YOURLS admin interface.

The extension also adds an entry to the context menu. If you right click into the page you’ll spot the logo:

The context menu receives another item 'Shorten URL' that can be used to trigger the popup. If you selected some text on the web page the selection will be nominated as a keykowrd, see also following picture.
The context menu receives another item 'Shorten URL' that can be used to trigger the popup. If you selected some text on the web page the selection will be nominated as a keykowrd, see also following picture.

The extension is able to detect selected text on the page. It will propose this selection as a keyword for shortening:

Selected text will be suggested as a keyword. You can still change it before clicking 'shorten'!
Selected text will be suggested as a keyword. You can still change it before clicking 'shorten'!

Right-clicking a link will shorten it’s target and not the current URL:

Right-clicking a link offers a menu item to shorten the link's target. Thus, not the active page will be shortened, but the page that is linked to!
Right-clicking a link offers a menu item to shorten the link's target. Thus, not the active page will be shortened, but the page that is linked to!

Preferences

The extension can be configured through the AddOn manager at about:addons (Menu->Add-ons). Double-click the YOURLS shorter and you will find the following menu:

Preferences of the YOURLS Firefox extension
Preferences of the YOURLS Firefox extension

Following values can be configures:

Download

This extension is licensed under GPLv3 and is developed at GitHub/binfalse/YOURLS-FirefoxExtension. It’s of course available from Mozilla’s Add-on Platform.

Issues

If you experience any problems, doubts, or feature requests please do not hesitate to contact me or file an issue at the GitHub project.

(Please take a look at the man-page. Browse bugs and feature requests.)