// ==UserScript==
// @name Fix Twitter links
// @namespace	https://github.com/lucio-martinez/fix-twitter-links/
// @description Fix twitter timeline links bypassing the horrible shortener system
// @grant none
// @require https://raw.githubusercontent.com/jquery/jquery/2.1.1/dist/jquery.min.js
// @include	https://twitter.com/*
// ==/UserScript==

var seconds  = 2,
    interval = seconds * 1000;

// Solve jQuery conflicts (http://wiki.greasespot.net/@grant)
this.$ = this.jQuery = jQuery.noConflict(true);

function fixLinks() {
  // Catch only text links,
  // not pictures and other stuff
  var links = $( '.twitter-timeline-link[data-link-fixed!=1]:not(.media, .u-hidden)' );

  $( links ).each(function(){
    var data = this.dataset;
    $( this ).attr('href', data.expandedUrl);
    // Set a flag to avoid processing it again later
    $( this ).attr('data-link-fixed', 1);
    //console.log('URL parsed! :D');
  });
}

setInterval(fixLinks, interval);

@@ -20,16 +20,23 @@
 / @name 
+       
 Fix Twit
@@ -132,17 +132,17 @@
 ion Fix 
-t
+T
 witter t
@@ -199,21 +199,45 @@
 tem%0A// @
-grant
+version     2%0A// @grant      
  none%0A//
@@ -246,16 +246,20 @@
 require 
+    
 https://
@@ -335,16 +335,20 @@
 include%09
+    
 https://
@@ -361,16 +361,64 @@
 r.com/*%0A
+// @include     https://tweetdeck.twitter.com/*%0A
 // ==/Us
@@ -476,16 +476,69 @@
 s * 1000
+,%0A    domain = window.location.hostname,%0A    callback
 ;%0A%0A// So
@@ -643,16 +643,352 @@
 true);%0A%0A
+/**%0A * Set a new href value into a HTML %3Ca%3E element.%0A */%0Afunction setUrlToLink(aElement, targetUrl) %7B%0A  $( aElement ).attr('href', targetUrl);%0A  // Set a flag to avoid processing it again later%0A  $( aElement ).attr('data-link-fixed', 1);%0A  //console.log('URL parsed! :D', targetUrl);%0A%7D%0A%0A/**%0A * Fix links for the twitter.com webite.%0A */%0A
 function
@@ -1028,21 +1028,16 @@
 t links,
-%0A  //
  not pic
@@ -1185,240 +1185,734 @@
     
-var data = this.dataset;%0A    $( this ).attr('href', data.expandedUrl);%0A    // Set a flag to avoid processing it again later%0A    $( this ).attr('data-link-fixed', 1
+setUrlToLink(this, this.dataset.expandedUrl);%0A  %7D);%0A%7D%0A%0A/**%0A * Fix links for the tweetdeck.twitter.com website.%0A */%0Afunction fixTweetDeckLinks() %7B%0A  // Catch visible links from tweets, quoted tweets and tweets in detail%0A  var selector = ('.tweet-text %3E .url-ext%5Bdata-link-fixed!=1%5D:not(.is-vishidden), '%0A                  +'.quoted-tweet .url-ext%5Bdata-link-fixed!=1%5D, '%0A                  +'.tweet-detail .url-ext%5Bdata-link-fixed!=1%5D'),%0A      links = $( selector 
 );%0A
+%0A
   
-  //console.log('URL parsed! :D');%0A  %7D);%0A%7D%0A%0AsetInterval(fixLinks
+$( links ).each(function()%7B%0A    setUrlToLink(this, this.dataset.fullUrl);%0A  %7D);%0A%7D%0A%0A// Check whether user is on TweetDeck or Twitter website%0Acallback = (domain === 'tweetdeck.twitter.com') ? fixTweetDeckLinks : fixLinks;%0A%0A// Run, run, run!%0AsetInterval(callback
 , in

Add support for TweetDeck timeline