Exposing YouTube’s Shortlink with Greasemonkey

Last week, I was surprised to find that YouTube does not promote its youtu.be shortlinks prominently on the video pages. Sure, it’s trivial enough to transform the regular url (http://www.youtube.com/watch?v=7Ujmb3jQAJE) into its shorter counterpart (http://youtu.be/7Ujmb3jQAJE), but let’s face it, we’re all a bunch of lazy sobs.

To cut a long story short, I pieced together a Greasemonkey userscript called ‘Youtu.be Shortlink’ that (surprisingly) adds the youtu.be link to the page, in the bar just above the video:


There are 3 options which you can set by editing the script and changing the value of the setting variable. (Since you’re still reading this you probably know how this works, but just in case: right click the Greasemonkey icon > Manage User Scripts… > select ‘Youtu.be Shortlink’ > Edit.) These options are:

  1. Just the shortlink (default);
  2. A button that sends the shortlink to Twitter;
  3. A button that sends the video’s title and shortlink to Twitter.

If this userscript works as good for you as it does for me, you might also enjoy one of my other Greasemonkey userscripts.

Update 2010-06-24: Youtube has now added as short link switch in under the url-box in their ‘share panel, rendering this userscript a tiny bit superfluous.