X.com (Twitter) - Auto Show Sensitive Content

X.com (Twitter) Auto Show Sensitive Content. You Don't Have To Click "Show" Button Anymore When Reading NSFW Tweets With Blur Alert. 推特自动显示色情暴力内容,不再被模糊化。

当前为 2024-06-18 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name X.com (Twitter) - Auto Show Sensitive Content
  3. // @namespace http://tampermonkey.net/
  4. // @version 2.1
  5. // @description X.com (Twitter) Auto Show Sensitive Content. You Don't Have To Click "Show" Button Anymore When Reading NSFW Tweets With Blur Alert. 推特自动显示色情暴力内容,不再被模糊化。
  6. // @author Martin______X
  7. // @include https://x.com/*
  8. // @include https://twitter.com/*
  9. // @icon https://www.google.com/s2/favicons?sz=64&domain=twitter.com
  10. // @grant none
  11. // @license MIT
  12. // ==/UserScript==
  13.  
  14. let $home_show_button = "css-175oi2r r-sdzlij r-1phboty r-rs99b7 r-lrvibr r-173mn98 r-1s2bzr4 r-15ysp7h r-4wgw6l r-3pj75a r-1loqt21 r-o7ynqc r-6416eg r-1ny4l3l";
  15.  
  16. let $media_show_button = "css-146c3p1 r-bcqeeo r-qvutc0 r-37j5jr r-a023e6 r-rjixqe r-16dba41 r-1loqt21 r-fdjqy7";
  17.  
  18. let $home_hide_button = "css-175oi2r r-sdzlij r-1phboty r-rs99b7 r-lrvibr r-15ysp7h r-4wgw6l r-3pj75a r-1loqt21 r-o7ynqc r-6416eg r-1ny4l3l";
  19.  
  20. const simpleClick = (async (button)=>{
  21. button.click();
  22. });
  23. const nfswClickInterval = setInterval(() => {
  24. try{
  25. //Counter
  26. let i = 0;
  27. //For Home & Profile--->Tweets
  28. let home_show_buttons = document.getElementsByClassName($home_show_button);
  29. //For Profile--->Media
  30. let media_show_buttons = document.getElementsByClassName($media_show_button);
  31. //Annoying Button
  32. let home_hide_buttons = document.getElementsByClassName($home_hide_button);
  33. //Attributes In Tabs
  34. let role = "";
  35. let dir = "";
  36.  
  37. //Click The Show Button On Home & Profile Tweets
  38. for(i=0;i<home_show_buttons.length;i++){
  39. let home_show_button = home_show_buttons[i];
  40. role = home_show_button.getAttribute("role");
  41. if(role == "button"){
  42. simpleClick(home_show_button);
  43. }
  44. }
  45. //Click The Show Button On Media
  46. for(i=0;i<media_show_buttons.length;i++){
  47. let media_show_button = media_show_buttons[i];
  48. role = media_show_button.getAttribute("role");
  49. dir = media_show_button.getAttribute("dir");
  50. if(role == "button" & dir == "ltr"){
  51. simpleClick(media_show_button);
  52. }
  53. }
  54. //Hide The Hide Button On Home & Profile Tweets
  55. console.warn(home_hide_buttons.length);
  56. for(i=0;i<home_hide_buttons.length;i++){
  57. let home_hide_button = home_hide_buttons[i];
  58. role = home_hide_button.getAttribute("role");
  59. if(role == "button"){
  60. home_hide_button.style.display = 'none';
  61. }
  62. }
  63. }catch(error){
  64. console.error(error)
  65. }
  66. }, 1);

QingJ © 2025

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