Created
October 7, 2013 16:33
-
-
Save ryanramage/6870889 to your computer and use it in GitHub Desktop.
A chrome/greasemonkey script to replace twitter t.co links with the actual links.
This file contains hidden or 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 TwitterLinks | |
// @namespace http://wiki.greasepot.net/examples | |
// @description Replace twitter short urls with expanded urls | |
// @match https://twitter.com/* | |
// ==/UserScript== | |
// $('a.twitter-timeline-link').each(function(item){ $(this).attr('href', $(this).data('expanded-url') ) }); | |
function fix() { | |
var links = document.querySelectorAll('a.twitter-timeline-link'); | |
for (var i = links.length - 1; i >= 0; i--) { | |
var link = links[i]; | |
var new_link = link.getAttribute('data-expanded-url') | |
link.setAttribute('href', new_link); | |
}; | |
} | |
setInterval(fix, 500); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment