🔥百度主页伪装成谷歌🔥

🐶把百度搜索伪装成谷歌搜索

目前为 2022-02-17 提交的版本。查看 最新版本

// ==UserScript==
// @name         🔥百度主页伪装成谷歌🔥
// @namespace    com.zhaolei
// @version      0.4
// @description  🐶把百度搜索伪装成谷歌搜索
// @author       赵磊
// @match        https://www.baidu.com/
// @grant        none
// @license      GPL-3.0
// ==/UserScript==

(function() {
    'use strict';
    // 移除元素方法
    function removeElementsById(ids) {
        for (const e of ids) {
            if (typeof e == 'string') {
                document.getElementById(e).remove();
            }
        }
    }
    function changeBaidu(className) {
        let resultCount = document.getElementsByClassName(className)[0]
        resultCount.innerText = resultCount.innerText.replace(/^百度/, '谷歌')
    }
    let needToRemoveElementIds = [];
    // 修改搜索框文本
    let searchButton = document.getElementById('su')
    searchButton.setAttribute('value', '谷歌一下')
    // 更改图片
    let img = document.getElementById("s_lg_img_new");
    // 换源
    img.setAttribute('src', 'http://r.photo.store.qq.com/psc?/V50ivL1t10zlq30Axslc3uGZmh0S5ltf/45NBuzDIW489QBoVep5mcUjdk7aGv0CXuNkULqVLVwvOeo8JhFVAoUZkQX8uYsBWLx5DQX0NVnlN.0GQI7hjlfR6*vTDp.7T6MpDkH8B0e4!/r');
    // 设置宽高
    img.setAttribute('width', '272');
    img.setAttribute('height', '92');
    // 需要移除的元素id
    needToRemoveElementIds.push('s_mp', 's-top-left', 'bottom_layer', 'lm-new')
    document.title = 'Google😉';
    removeElementsById(needToRemoveElementIds);
})();

QingJ © 2025

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