Greasy Fork is available in English.
傻瓜式推特去广告,未经过可靠测试
当前为
// ==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'
}
}
}
})();