Welcome to Copy ShortURL’s documentation!

Copy ShortURL is a Firefox add-on. It allows you to copy a short URL for the page you are currently visiting to your clipboard at the click of a button.

Contents

Intro and Installation

This is a Firefox add-on built with the Jetpack SDK.

On any webpage, this jetpack adds a new item in the right click menu called “copy short URL”. When you click it, the add-on looks for a canonical short URL exposed in the page header. Currently, a number of major websites expose their own short URLs for any entry on their webpages, among these:

  • youtube (“youtu.be/…”),
  • flickr (“flic.kr/…”),
  • wordpress.com (“wp.me/…”),
  • Arstechnica (“arst.ch/…”),
  • Techcrunch (“wp.me/…”),

and many more.

If, however, the site does not name its own short URL, the add-on automatically falls back to making a short URL using a URL shortening service (by default: is.gd – see Using a custom short URL service for how to change that).

Either way, after a fraction of a second, you end up with a short URL in your clipboard, ready to be used in forum posts, tweets, or wherever else you please.

Installation

The newest stable version of Copy ShortURL is always available on Mozilla Add-ons and can be installed directly from there.

If you want to use a development version, you’ll need to check out the code form github and build it. Refer to the Jetpack SDK Docs to find out how.

Dependencies

Using a custom short URL service

By default, Copy ShortURL falls back to the URL shortening service is.gd. As I am not affiliated with is.gd however, I wanted to make it easy for people to use whatever service they like.

You may specify a different service by clicking “preferences” on Copy ShortURL in the Firefox add-ons pane.

There, you can choose from default services or enter your own custom URL.

When creating a new short URL, the add-on will request (GET) the URL you specify here, while replacing the placeholder %URL% with the long URL that it is trying to shorten. As a reply from the shortening service, it expects a one-line, plain text document containing the shortened URL.

Examples:

  • http://is.gd/api.php?longurl=%URL% (default) (docs)
  • http://tinyurl.com/api-create.php?url=%URL% (3rd party docs)
  • http://yoursite.com/yourls-api.php?signature=<apikey>&action=shorturl&format=simple&url=%URL% (docs)

bit.ly

Popular service bit.ly has a slighty more elaborate API. Create an OAuth access token, then enter the following custom service URL into Copy ShortURL’s settings:

https://api-ssl.bitly.com/v3/shorten?format=txt&access_token=<accesstoken>&longUrl=%URL%

Replace <accesstoken> in the URL with the token you created.

Full bitly API docs exist.

Notification Styles

By default, the add-on uses Growl notifications, with a fallback to a standard Firefox notification box in case Growl is not present.

If you prefer to change this behavior, or even want to switch off notifications altogether, there’s an option you can set. In about:config, set the setting extensions.copyshorturl.notifications to:

  • 0: Switches off notifications altogether
  • 1: Always uses a standard notification bar
  • 2: Uses Growl if present, a notification bar otherwise. (default)

Indices and tables