This is an extension for Chromium (Google’s web browser) to shorten URLs with your own YOURLS installation.

YOURLS is an URL shortener, just like or, but it’s open source and so you’re able to install your own private instance. Thus, you can diminish the tracking of these big platforms ;-) This piece of software is an extension for the browser Chromium that let’s you quickly shorten the URL of the website you are currently visiting. All you need is an installation of YOURLS. You can also find this plugin in Chrome’s Web Store.


 Figure 1: Options Page
Figure 1: Options Page

The extension is available from Googles. To install the latest dev version just clone the GitHub repository and load this extension unpacked (read more at Googles dev get-started-guide).

Before you can start shortening URLs you need to do some configuration. To open the configuration page right-click the icon next to your address bar and choose Options, or open chrome://extensions/ and click the Options link of the YOURLS entry. You’ll see a page similar to the screenshot in Figure 1.

Specify the URL to your YOURLS instance. Don't forget the leading `http://` . For those of you familiar with YOURLS: don't include `yourls-api.php` , I'll take care of it ;)
the signature is the secret for your YOURLS account, so you don't have to give anyone your credentials. You'll find the signature token of your account in the admin interface of your YOURLS installation.
How many seconds to wait for an answer?
when you try to shorten a URL the extension will send an `XMLHTTPRequest` to the webserver running the YOURLS instance. Depending on the performance of network and webserver it may take some time to get an answer. Configure the max time to wait before the extension assumes that the request failed. In this case you'll get an error message.
Ask for a keyword
check this box to provide a keyword for shortening. If it is checked you'll get a text field before the URL is sent to the webserver, otherwise the extensions shortens the URL immediately.

If the form is filled correctly save your settings and give it a try!


The extension provides two different ways for interaction:

 Figure 2: The popup produced by the extension.
Figure 2: The popup produced by the extension.

The Icon in the Toolbar

Click the icon to shorten the URL of the web site you’re currently visiting and a popup will appear. If you’ve configured the extension to ask for a keyword the popup will contain a textfield and a button. Just type the keyword into the field and press the button to start shortening. In case you didn’t set the Ask for a keyword tick in the options page, the extension will shorten the URL immediately.

The Context Menu

 Figure 3: The resulting overlay after clicking the context menu.
Figure 3: The resulting overlay after clicking the context menu.

If you right-click a link on a page an entry in your context menu will appear saying “Shorten Link”. Klick this item to shorten the target of this link instead the URL of the current page.
Furthermore, if you right-click selected text in the current page the extension adds a context menu entry “Shorten Page” to shorten the page using the selected text as keyword. (The selection will just appear in the textfield for the keyword, you still have to press the button to start shortening.)
If you right-click a link while some other text is selected, the selected text will be used as keyword for shortening the link target.

Download: Extension: in Google's Web Store SourceCode: at GitHub (Please take a look at the man-page. Browse bugs and feature requests.)