Twitter hide unreplyable posts

hide all tweets that cant be replied to

  1. // ==UserScript==
  2. // @name Twitter hide unreplyable posts
  3. // @namespace http://tampermonkey.net/
  4. // @version 2024-05-15
  5. // @description hide all tweets that cant be replied to
  6. // @author You
  7. // @match https://twitter.com/*
  8. // @match https://x.com/*
  9. // @icon https://www.google.com/s2/favicons?sz=64&domain=twitter.com
  10. // @grant none
  11. // @license MIT
  12. // ==/UserScript==
  13.  
  14.  
  15.  
  16.  
  17. setInterval(()=>{
  18. const tweets=document.querySelectorAll("main section [aria-label*='Timeline'] [data-testid='cellInnerDiv']")
  19. for(const tweet of [...tweets]){
  20. let replyIcon=tweet.querySelector("[role='group'] [data-testid='reply'] svg");
  21. if(replyIcon){
  22. const replyIconStyle=getComputedStyle(replyIcon)
  23. const opacity=+replyIconStyle.opacity;
  24. if(opacity===0.4){
  25. tweet.style.display="none"
  26. }
  27. }
  28. }
  29. },50)

QingJ © 2025

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