Hide tweets from blue check accounts (status only)

Hide tweets from blue check accounts on twitter.com and x.com for status pages only

  1. // ==UserScript==
  2. // @name Hide tweets from blue check accounts (status only)
  3. // @match https://twitter.com/*/status/*
  4. // @match https://x.com/*/status/*
  5. // @version 1.1
  6. // @description Hide tweets from blue check accounts on twitter.com and x.com for status pages only
  7. // @namespace Violentmonkey Scripts
  8. // @license MIT
  9. // @author LucioB16
  10. // ==/UserScript==
  11.  
  12. // Use setInterval to repeatedly run the function every 500 milliseconds.
  13. // This ensures the script catches newly loaded tweets as you scroll or interact with the page.
  14. setInterval(function hideBlueCheckTweets() {
  15.  
  16. // Select all elements with the specified data-testid attribute ('cellInnerDiv').
  17. // This includes both tweet blocks and structural elements dividing tweets on the page.
  18. const tweets = document.querySelectorAll('div[data-testid="cellInnerDiv"]');
  19.  
  20. // Loop through each element, accessing its index in the list.
  21. tweets.forEach((tweet, index) => {
  22.  
  23. // Ignore the first tweet (index 0), which is typically the main tweet of the thread.
  24. // Also, ignore elements in odd positions (these may be dividers or other non-tweet elements).
  25. if (index !== 0 && index % 2 === 0) {
  26.  
  27. // Search within the current element for the blue check verification icon.
  28. // The blue check icon is identified by the 'data-testid="icon-verified"' attribute.
  29. const blueCheckIcon = tweet.querySelector('svg[data-testid="icon-verified"]');
  30.  
  31. // If the element contains a blue check icon, hide the entire element by setting its display to 'none'.
  32. if (blueCheckIcon) {
  33. tweet.style.display = "none";
  34. }
  35. }
  36. });
  37. }, 500);

QingJ © 2025

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