百度搜索页面美化成谷歌 - 切记需要配合脚本<AC-baidu:重定向优化百度搜狗谷歌必应搜索_favicon_双列 - inDarkness>使用

特色:谷歌化,尽量的精简

目前为 2020-05-31 提交的版本。查看 最新版本

// ==UserScript==
// @name        百度搜索页面美化成谷歌 - 切记需要配合脚本<AC-baidu:重定向优化百度搜狗谷歌必应搜索_favicon_双列 - inDarkness>使用
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  特色:谷歌化,尽量的精简
// @author       lrc
// @match        https://www.baidu.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    //$(".c-container").css("margin-bottom", "50px !important");
    //$("#container").css("height","1900px");
    //$(".c-container").css("cssText", "margin-top:50px !important;");
   // $(".c-container").css("padding-bottom", "50px");
     //$(this).css("background","transparent");
         //$(this).css("cssText","background:transparent !important");

    //引入jquery库
    var head = document.getElementsByTagName("html")[0];
    var script = document.createElement("script");
    script.src = "https://code.jquery.com/jquery-3.4.1.min.js";
    head.appendChild(script);

    //去底部元素
    $("#foot").remove();
    //页面底部有点边距
    $("body").css("padding-bottom", "70px");

    //去logo、搜索按钮、搜索右边的高级搜索、搜索工具
    $("#result_logo").remove();
    $(".s_btn_wr").remove();
    $("#u").remove();
    $(".search_tool").remove();


    //删除搜索框推荐
    $("#s-hotsearch-wrapper").remove();


    // 百度首页搜索框居中
    var currrentURL = window.location.href;
    var str = /index.php/

    //搜索类型居中显示
    $("#s_tab").css("position", "relative");
    $("#s_tab>.s_tab_inner").css({"position":"absolute", "left":"53%"});


    //百度首页美化
    if(str.test(currrentURL) || currrentURL=="https://www.baidu.com/"){
        $("#head_wrapper").css({"top":"50%", "transform":"translateY(-60%)"})

        $("#bottom_layer").remove();

        $("#s_upfunc_menus").remove();

        $(".s_bri").remove();

        $("#u_sp>a").filter(function(index){
            if(index < 3){
                return true;
            };
        }).remove();
        $("#su").remove();
    }



    $(".s_ipt_wr").css({"border-right":"1px solid #b6b6b6","border-radius":"20px","padding-left":"20px","height":"40px","line-height":"40px"});



    console.log($("#head").scrollTop());

    $("#result_logo").css({"left":"calc(44% - 440px)", "top":"6px"});

    $("#kw").focus(function() {
        $(".s_ipt_wr").css("border-right-color", "#4791ff");
    })

    $("#kw").blur(function() {
        $(".s_ipt_wr").css("border-right-color", "#b6b6b6");
    })


    $("#head").css("background","white");
    $("#s_tab").css("background","white");


     $(".c-container").css("box-shadow","0 0 20px 2px rgba(0,0,0,0.3)");

    $(".c-container").mouseover(function() {
        $(this).css("box-shadow","0 0 2px grey");

    })



     $(".c-container").mouseout(function() {
        $(".c-container").css("box-shadow","0 0 20px 2px rgba(0,0,0,0.3)");
    })



      $(".c-container").css("border-radius","20px");
    $(".t").css("background-color","transparent");

    setTimeout(function() {
        var div = $("<div></div>")
        div.css("height", "40px");

        $(".c-container").after(div);

        var div2 = $("<div></div>")
        div2.css("height", "30px");

        $(".c-container").eq(0).before(div2);
    }, 0);

    $(".nums").css("margin-bottom","30px");

    $(".s_tab_inner>a").eq(4).nextAll().remove();

    $(".s_tab_inner>b").css("left", "calc(50% - 290px)");
    $(".s_tab_inner>a").css("left", "calc(50% - 290px)");
    $(".s_tab_inner>a").css("font-weight", "bold");
    $(".s_tab_inner>b").css("border-bottom", "3px solid #1A73E8");
    $(".s_tab_inner>a").css("color", "#5f6368");
    $(".s_tab_inner>a").mouseover(function() {
        $(this).css("color", "#1A73E8");
    })

     $(".s_tab_inner>a").mouseout(function() {
        $(this).css("color", "#5f6368");
    })



     var con = document.getElementById("container");
    con.setAttribute('style', 'background-color:white');

    // Your code here...
})();

QingJ © 2025

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