关闭推特敏感内容警告

关闭 警告:敏感内容

// ==UserScript==
// @name         关闭推特敏感内容警告
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  关闭 警告:敏感内容
// @author       花似
// @match        https://twitter.com/*
// @icon         https://abs.twimg.com/responsive-web/client-web/icon-svg.ea5ff4aa.svg
// @grant        GM_addStyle
// @license      MIT
// ==/UserScript==
 
(function() {
    'use strict';
 
    // Add a counter at the bottom right corner
    var counter = document.createElement('div');
    counter.id = 'tm-counter';
    counter.textContent = '已经跳过警告 0 个';
    document.body.appendChild(counter);
 
    // Style the counter
    GM_addStyle('#tm-counter { position: fixed; right: 20px; bottom: 20px; background: #f7f9f9; color: #cccbcb; padding: 5px 10px; border-radius: 5px; }');
 
    var count = 0;
    var checkAndClick = function() {
        var warningElements = document.querySelectorAll('li[role="listitem"] div[role="button"] span');
        for (var i = 0; i < warningElements.length; i++) {
            var warningElement = warningElements[i];
            if (warningElement.textContent.includes('显示')) {
                warningElement.click();
                count++;
                counter.textContent = '已经跳过警告 ' + count + ' 个';
            }
        }
    };
 
    // Check every second
    setInterval(checkAndClick, 2000);
})();

QingJ © 2025

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