YOURLS Firefox extension
WARNING: This Firefox extension is using legacy methods and outdated! Check the YOURLS Firefox WebExtension for the latest version.
Extension to shorten URLs from Firefox with your own YOURLS installation.
YOURLS is an URL shortener, just like bit.ly or goo.gl, but you are allowed to install your own private instance. So you can diminish the tracking of these big platforms ;-) This piece of software is an extension for the browser Firefox that let’s you quickly shorten the URL of the website you are just visiting. All you need is a Firefox and an installation of YOURLS. You can also find this plugin at Mozillas addon service platform.
Integration
This add-on for the Firefox consists of three modifications of your browser overlay:
- Toolbar-button: This button comes with a menu, you can shorten the current page or open a new window browsing to the admin page of your YOURLS API:
- Context-menu: A new entry is integrated in your browsers context menu, that will shorten the current page:
- Statusbar-button: In addition a small button is placed into the add-ons status bar, a click shortens the current page:
The result of a shortening will be displayed in an alert box:
Settings
The setup can be done in the Add-ons Manager (browse to about:addons). Click on the Preferences button next to the YOURLS shortener entry and you’ll see a window like this:
Following values should be provided:
- API URL
- The URL to your YOURLS installation. In my case it's https://s.binfalse.de/
- Signature
- The signature of your account. You will find this string on the Tools page in the Secure passwordless API call section. This string is not required for public YOURLS installations.
- Ask for a keyword?
- Should the extension ask for a keyword before shortening? If this box is checked you'll always be asked like this:
- Max wait time
- How many seconds should we wait for an answer from the API before we give up?
Download
This extension is licensed under GPLv3 and has it’s own project at GitHub and of course it’s listed on AMO.
(Please take a look at the man-page. Browse bugs and feature requests.)
Leave a comment
There are multiple options to leave a comment:
- send me an email
- submit a comment through the feedback page (anonymously via TOR)
- Fork this repo at GitHub, add your comment to the _data/comments directory and send me a pull request
- Fill the following form and Staticman will automagically create a pull request for you:
25 comments
Looks neat !! I’ve been reported it doesn’t work with FF 5, could you update?
Hi there-
This is fantastic! Two quick questions for you. :)
Am I understanding it correctly that the customization comes after the toolbar is installed?
If so… As I understand it, this would be no bueno for public installations. Is there a way to adapt this in such a way that we could, say, offer the extension to download from our website for other people to use?
Thanks and best wishes, Kristen
That’s a very cruel authorization method you got going there, btw…
Hey Ozh,
since FF 5 wasn’t released officially while I developed the extension it is currently just available for versions < 4.1. When the AMO editors approve my current version I’ll submit a further version, also available for FF 5.
Thank you!
I suggest include the Russian language for your plagin, will help with translation. Is it possible, given the opportunity send a link to Twitter and Facebook? Thanks.
Will there be support for plug-in FF6?
I’m working on it, within the next days I’ll publish an update ;)
Hello, Martin.
I’d like to install this extension, as I own my Yourls instance; do you have any news about FF 6.x compatibility release ?
Thanks, anymay.
Hi Ludo,
the plugin is available for FF6 since August 21, 2011. You’ll find it here. Unfortunately it has to get reviewed by the dev-team of Mozilla before you’ll find it on it’s main page (or in the search results). I submitted the plugin for review on August 21, but it’s still waiting for a review in the queue. (Currently it’s on position 56 of 241, after ~1 month!!). As long as it’s in this queue I cannot do anymore than waiting (and hoping that Mozilla extends it’s dev-team to fit it’s extremely shortened release cycles).
I hope this answer helps, Martin
Hi Martin,
great extension, muchos kudos! With bumping the
maxVersion
ininstall.rdf
to7.*
your extension also works fine on Firefox 7.Would it be possible to automatically copy the short-url to the clipboard after it has been generated? Code would probably just this:
var clipboard = Components.classes["@mozilla.org/widget/clipboardhelper;1"]
.getService(Components.interfaces.nsIClipboardHelper);
clipboard.copyString( ... );
Some other small things I noticed while playing with the extension (btw: I am using v1.2, bumped for Fx7):
Just thoughts. :-) Love your extension, makes using YOURLS so much easier.”
Hi RD,
thanks a lot for sharing your experiences! I just implemented some of your ideas in version 1.3 and submitted it for the review. I think it will stay there for about one month, but the extension is already available at http://s.binfalse.de/ffextv. Your pieces of advice were very useful, so thank you very much indeed!
Have a nice day, Martin
Hi
I’ve a suggestion, it possible move button from statusbar to toolbar to made shorturl direct and fast? Or can you add a short key combination to made short url?
Congratulations for your addon
Hi Antonio,
there is already a button for integration to the toolbar, see figure 1 of this article. If you need help to integrate it feel free to ping me. I like the idea of a key-shortcut, maybe I’ll implement it in the next version.
Thanks a lot, Martin
[…] YOURLS Firefox extension […]
Right-clicked on a url on a page expecting the intuitive result of the link target url to be shortened, but the page itself got shortened instead.
Right-click on link to shorten target link seemed to be working after modifying browsel.xul:
thanks for the addon!
Hey, nice job. Love this little plugin. I’d like to make a suggestion if you don’t mind.
Could there be an option to be able to turn off the dialog box that comes up with the confirmation if it succeeds, and just have the statusbar/toolbar icon change in appearance for a few seconds? EG: having a checkmark appear over it for 5 seconds? I think that it’d make the workflow a bit quicker for users. I almost didn’t notice that it auto-copied to clipboard because I was checking for the link while the dialog box was open.
Another feature that would improve the plugin would for a right click context on the status/toolbar icon/button, which would allow the user to access the settings dialog. I was a stumped for a couple of moments, before realizing that I could setup the plugin via the addons page. It’s a bit unintuitive for some users, as most new addons present the setup on the first-run, or via right click on the new icon the addon provides.
I finally pushed a new version to AMO: 1.5-rc1. In this version I’ve implemented some of your feature requests. Thanks a lot for sharing your thoughts!
Loved this extention just as it is, but suddenly became unresponsive on all my machines. The test button works with a good response as does “browse to api” but a request to shorten just leaves me waiting for a dialog, I have even upped the wait time to 9 seconds. v1.5 FF24.0 win xp&vista.
to clarify, buttons in toolbar and status bar unresponsive, context menu works fine.
Fixed this issue together with stu. (Thanks a lot!) An updated version is already submitted to the reviewing queue. Those, who don’t want to wait for the review can already update to the new version.
When selecting a sentence prior to clicking “Shorten”, and the sentence contains whitespaces, the whitespaces are stripped. I would like them to be replaced by ‘-‘, and all upper cases to be replaced by lowercases. Similar to soundcloud and in line with common practice elsewhere. What’s your opinion?
sounds reasonable, will implement it: https://bt.binfalse.de/view.php?id=7
Nice extension, just discovered :) Is there any chance it will be possible to handle multiple yourls installations in future releases?