您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
去除百度搜索推广、广告
// ==UserScript== // @name 去除百度搜索广告 // @namespace http://tampermonkey.net/ // @version 0.21 // @description 去除百度搜索推广、广告 // @author 大雄、小虾吃大虾 // @match http*://*.baidu.com/* // @grant none // ==/UserScript== $(function(){ ///页面加载完成后,500毫秒调用去除广告 setTimeout(function(){ startAD(); },500); }); function startAD(){ ///每500毫秒执行一次去除广告 setInterval( function (){ ///百度经验底部广告 $('.EC_result').remove(); ///百度搜索界面广告 var container = document.getElementById( 'content_left' ); if(container){ Array.from( container.children).forEach( function ( item ){ if( item && /display:block\s+!important;visibility:visible\s+!important/i.test( item.getAttribute( 'style' ) ) ) { $(item).fadeTo("fast",0.01,function(){ $(item).slideUp("normal",function(){ $(item).remove(); }); }); } if($(item).find('span').text() == "广告") { $(item).fadeTo("fast",0.01,function(){ $(item).slideUp("normal",function(){ $(item).remove(); }); }); } }, container ); } }, 500 ); }