Created
May 16, 2012 06:23
-
-
Save maripo/2708018 to your computer and use it in GitHub Desktop.
Expand shortened URLs on Twitter (userscript for Firefox and Google Chrome)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name ExpandShortURLs | |
// @namespace maripo.org | |
// @description Expand shortened URL on Twitter | |
// @include https://twitter.com/* | |
// @version 1 | |
// ==/UserScript== | |
(function() | |
{ | |
setInterval (function() | |
{ | |
var links = document.getElementsByTagName('A'); | |
for(i=0; i<links.length; i++) | |
{ | |
link = links[i]; | |
attr = link.getAttribute('data-ultimate-url'); | |
if (attr) | |
{ | |
link.innerHTML = decodeURIComponent(attr); | |
link.href = attr; | |
} | |
} | |
}, | |
1000); | |
} | |
)(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment