傻瓜式推特去广告

傻瓜式推特去广告,未经过可靠测试

目前為 2022-05-17 提交的版本,檢視 最新版本

// ==UserScript==
// @name         傻瓜式推特去广告
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  傻瓜式推特去广告,未经过可靠测试
// @author       炽幻
// @match        https://twitter.com/home
// @icon         https://www.google.com/s2/favicons?sz=64&domain=twitter.com
// @grant        none
// @license MIT
// ==/UserScript==

(function() {
    'use strict';

    // Your code here..
    window.onscroll = function(){
        let main = document.getElementById('react-root').children[0].className.split(' ');
        let a;
        for(let i=0;i<main.length;i++){
            if(main[i].indexOf('css')!=-1){
                a = document.getElementsByClassName(main[i]);
            }
        }
        for(let i=0;i<a.length;i++){
            if(a[i].dataset.testid=='placementTracking'){
                console.log('去掉一条广告');
                a[i].style.display = 'none'
            }
        }
    }
    
})();

QingJ © 2025

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