您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
百度去广告+页面美化+屏蔽百度搜索结果中的广告等
当前为
// ==UserScript== // @name 百度去广告+页面美化【屏蔽百度搜索结果中的广告等】 // @namespace http://tampermonkey.net/ // @version 2.1 // @icon https://www.baidu.com/favicon.ico // @description 百度去广告+页面美化+屏蔽百度搜索结果中的广告等 // @author wushx // @match *://*.baidu.com/* // @grant none // @require https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js // @license MIT // ==/UserScript== let dom = {}; dom.query = jQuery.noConflict(true); dom.query(document).ready(function ($) { const cycletime = 400; if (location.href.indexOf('www.baidu.com') > 0) { // 右侧栏全部关闭(大部分是广告) $("#content_right").remove(); // top-ad也关闭 $("#top-ad").remove(); $(".ec-pl-container").remove(); $("#content_left > div").each(function () { if ($(this).attr('id') === undefined && $('> style', this).attr('id') !== undefined) { $(this).remove(); } }) //直达逛B站 var goBHtml='<a href="https://www.bilibili.com/video/BV1JP4y1g7aG?from=search" ><font size="2" color="red">逛B站去</font></a>' $('#u').append(goBHtml); setInterval(function () { // 右侧栏全部关闭(大部分是广告) $("#content_right").remove(); // 搜索结果中有的条目广告 $("#content_left > div").each(function () { if ($(this).attr('id') === undefined && $('> div', this).attr('data-placeid') !== undefined) { $(this).remove(); } }) // 有延时跳出的广告 $("a").each(function () { if ($(this)[0].innerHTML === '广告') {$(this).parents(".result").remove(); } }) $(".san-card").each(function () { if ($(this).attr("tpl") === 'feed-ad') { $(this).remove() } }) $('.ec_ad_results').hide(); //搜索内容居中 $("#s_tab").css("padding-left","276px"); $("#container").css("margin-left","276px"); $('.toindex').remove();//首页去除 $('.pf').remove();//设置去除 $('.help').remove();//帮助去除 }, cycletime); } });