Created
October 12, 2014 13:33
-
-
Save baptx/c43a38709bb87fb80702 to your computer and use it in GitHub Desktop.
Twitter URI resolver (t.co links)
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
var linksLength = document.getElementsByClassName("twitter-timeline-link").length; | |
for (var i = 0; i < linksLength; i++) { | |
var link = document.getElementsByClassName("twitter-timeline-link")[i]; | |
if (link.getAttribute("data-ultimate-url")) | |
link.setAttribute("href", link.getAttribute("data-ultimate-url")); | |
else | |
link.setAttribute("href", link.getAttribute("data-expanded-url")); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment