您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
解决百度全家桶的众多广告~
当前为
// ==UserScript== // @name 百度去广告+美化 // @namespace https://www.huankong.top/ // @version 1.37 // @description 解决百度全家桶的众多广告~ // @author 幻空 // @match https://www.baidu.com/* // @match https://fanyi.baidu.com/* // @icon https://www.huankong.top/favicon.ico // @grant none // ==/UserScript== (function() { //初始化变量 let vm = 0; //浏览器窗口大小变化时 window.onresize = function(){ size(); fresh(); }; function size(){ vm = $(window).width()/100; console.log(vm); } //监听页面内容是否刷新 $("#wrapper_wrapper").bind('DOMNodeInserted', function(e) { fresh(); }); function fresh(){ //百度搜索 $("#content_right").remove(); $(".new_head_nums_cont_outer").remove(); $("#u").remove(); $("#u1").remove(); $("#result_logo").remove(); $("#s_tab").css({opacity:"0"}); $("#content_left").css({marginTop:"-25px"}); $("#foot").remove(); if(vm <=10){ $("#form").css({margin:"15px 0px 15px 3%"}); $("#content_left").css({marginLeft:"-11%"}); $("#rs").css({marginLeft:"-11%"}); $("#page").css({marginLeft:"-11%"}); }else if(vm <= 12.5){ $("#form").css({margin:"15px 0px 15px 30%"}); $("#content_left").css({marginLeft:"24%"}); $("#rs").css({marginLeft:"24%"}); $("#page").css({marginLeft:"24%"}); }else if(vm <= 13){ $("#form").css({margin:"15px 0px 15px 30%"}); $("#content_left").css({marginLeft:"24%"}); $("#rs").css({marginLeft:"24%"}); $("#page").css({marginLeft:"24%"}); }else if(vm <= 14){ $("#form").css({margin:"15px 0px 15px 30%"}); $("#content_left").css({marginLeft:"26%"}); $("#rs").css({marginLeft:"26%"}); $("#page").css({marginLeft:"26%"}); }else if(vm <= 15){ $("#form").css({margin:"15px 0px 15px 30%"}); $("#content_left").css({marginLeft:"28%"}); $("#rs").css({marginLeft:"28%"}); $("#page").css({marginLeft:"28%"}); }else if(vm <= 16){ $("#form").css({margin:"15px 0px 15px 30%"}); $("#content_left").css({marginLeft:"30%"}); $("#rs").css({marginLeft:"30%"}); $("#page").css({marginLeft:"30%"}); }else if(vm <= 17){ $("#form").css({margin:"15px 0px 15px 30%"}); $("#content_left").css({marginLeft:"32%"}); $("#rs").css({marginLeft:"32%"}); $("#page").css({marginLeft:"32%"}); }else if(vm <= 18){ $("#form").css({margin:"15px 0px 15px 30%"}); $("#content_left").css({marginLeft:"34%"}); $("#rs").css({marginLeft:"34%"}); $("#page").css({marginLeft:"34%"}); }else if(vm <= 19){ $("#form").css({margin:"15px 0px 15px 30%"}); $("#content_left").css({marginLeft:"39%"}); $("#rs").css({marginLeft:"39%"}); $("#page").css({marginLeft:"39%"}); }else if(vm > 19.03){ $("#form").css({margin:"15px 0px 15px 30%"}); $("#content_left").css({marginLeft:"20%"}); $("#rs").css({marginLeft:"20%"}); $("#page").css({marginLeft:"20%"}); }else{ let num = localStorage.getItem("baidu_killer"); if(num<=0){ localStorage.setItem("baidu_killer",1); alert("臭宝你的屏幕很怪耶,我没办法适配,建议送我一台我来适配一下(只会弹出一次放心)"); }else{ if(num === null){ localStorage.setItem("baidu_killer",0); }else{ console.log("已经弹出过啦~"); } } $("#form").css({margin:"15px 0px 15px 30%"}); $("#content_left").css({marginLeft:"40%"}); $("#rs").css({marginLeft:"40%"}); $("#page").css({marginLeft:"40%"}); } let count = $(".m"); let add = 0; for(let i = 0;i<=count.length;i++){ if(count.eq(i).text()==="广告"){ count.eq(i).parent().parent().remove(); add++; } if($(".num").lenght === 0){ $("body").append("<p class='num' style='position:absolute;top: 0;left: 0;z-index: 9999;'>傻逼百度又搞了"+add+"条广告(会出现变化)</p>"); }else{ $(".num").remove(); $("body").append("<p class='num' style='position:absolute;top: 0;left: 0;z-index: 9999;'>傻逼百度又搞了"+add+"条广告(会出现变化)</p>"); } } //百度翻译 $(".header").css({display:"none"}); $(".manual-trans-btn").css({display:"none"}); $(".translate-setting").css({display:"none"}); $(".domain-trans-wrapper").remove(); $(".footer").remove(); $(".trans-other-right").remove(); $("#left-result-container").bind('DOMNodeInserted', function() { $("#app-read").remove(); }); $(".translateio").css({position:"relative",top:"15px"}); $(".trans-operation").css({marginLeft:16.207455429497568*vm+"px"}); $(".container").css({width:"100%"}); } //在百度首页时 if(window.location.href === "https://www.baidu.com/"){ $("#s_top_wrap").remove(); $(".s-top-nav").remove(); $("#s-top-left").remove(); $("#u").remove(); $("#u1").remove(); $("#s_side_wrapper").remove(); $("#bottom_layer").remove(); $("#s-hotsearch-wrapper").remove(); $("#s_lg_img").css({top:"30%"}); $("#lg").css({max_height:"",height:"100%"}) $("#kw").keypress(function (event) { if (event.keyCode === 13) { fresh(); } }) }else{ //页面加载完成 size(); fresh(); } })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址