Full URLs for Twitter

Replace t.co URLs with the original

  1. // ==UserScript==
  2. // @name Full URLs for Twitter
  3. // @description Replace t.co URLs with the original
  4. // @include twitter.com
  5. // @match *://*.twitter.com/*
  6. // @version 1.0
  7. // @grant none
  8. // @namespace https://greasyfork.org/users/11079
  9. // ==/UserScript==
  10. (function (win) {
  11. var main = function () {
  12. Array.prototype.slice.call(win.document.querySelectorAll('#page-container a.twitter-timeline-link[href*="t.co"]'), 0) .forEach(function (el) {
  13. if (el.dataset && el.dataset.expandedUrl) {
  14. el.href = el.dataset.expandedUrl;
  15. }
  16. });
  17. };
  18. main();
  19. win.onscroll = main;
  20. }) (window);