Hovering Bird

Makes Twitter alt tags appear as tooltips.

  1. // ==UserScript==
  2. // @name Hovering Bird
  3. // @namespace http://tantusar.github.io
  4. // @include https://twitter.com/*
  5. // @include https://tweetdeck.com/*
  6. // @version 2
  7. // @grant none
  8. // @description Makes Twitter alt tags appear as tooltips.
  9. // ==/UserScript==
  10.  
  11. var targetNode = document;
  12.  
  13. var config = { childList: true, subtree: true };
  14.  
  15. var callback = function(mutationsList) {
  16. document.querySelectorAll("img").forEach(img => {
  17. if(img.alt && img.alt != "Image"){
  18. img.setAttribute("title", img.alt);
  19. }
  20. });
  21. };
  22.  
  23. var observer = new MutationObserver(callback);
  24.  
  25. observer.observe(targetNode, config);

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址