关闭推特敏感内容警告

关闭 警告:敏感内容

  1. // ==UserScript==
  2. // @name 关闭推特敏感内容警告
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.0
  5. // @description 关闭 警告:敏感内容
  6. // @author 花似
  7. // @match https://twitter.com/*
  8. // @icon https://abs.twimg.com/responsive-web/client-web/icon-svg.ea5ff4aa.svg
  9. // @grant GM_addStyle
  10. // @license MIT
  11. // ==/UserScript==
  12. (function() {
  13. 'use strict';
  14. // Add a counter at the bottom right corner
  15. var counter = document.createElement('div');
  16. counter.id = 'tm-counter';
  17. counter.textContent = '已经跳过警告 0 个';
  18. document.body.appendChild(counter);
  19. // Style the counter
  20. GM_addStyle('#tm-counter { position: fixed; right: 20px; bottom: 20px; background: #f7f9f9; color: #cccbcb; padding: 5px 10px; border-radius: 5px; }');
  21. var count = 0;
  22. var checkAndClick = function() {
  23. var warningElements = document.querySelectorAll('li[role="listitem"] div[role="button"] span');
  24. for (var i = 0; i < warningElements.length; i++) {
  25. var warningElement = warningElements[i];
  26. if (warningElement.textContent.includes('显示')) {
  27. warningElement.click();
  28. count++;
  29. counter.textContent = '已经跳过警告 ' + count + ' 个';
  30. }
  31. }
  32. };
  33. // Check every second
  34. setInterval(checkAndClick, 2000);
  35. })();

QingJ © 2025

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