baptx

twitter_uri_resolver

Jun 25th, 2012
254
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var linksLength = document.getElementsByClassName("twitter-timeline-link").length;
  2.  
  3. for (var i = 0; i < linksLength; i++) {
  4.     var link = document.getElementsByClassName("twitter-timeline-link")[i];
  5.     if (link.getAttribute("data-ultimate-url"))
  6.         link.setAttribute("href", link.getAttribute("data-ultimate-url"));
  7.     else
  8.         link.setAttribute("href", link.getAttribute("data-expanded-url"));
  9. }
RAW Paste Data