您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
🐶把百度搜索伪装成谷歌搜索
// ==UserScript== // @name 🔥百度主页伪装成谷歌🔥 // @namespace com.zhaolei // @version 1.0 // @description 🐶把百度搜索伪装成谷歌搜索 // @author 赵磊 // @match https://www.baidu.com/ // @grant none // @license GPL-3.0 // ==/UserScript== (function() { var explorer = window.navigator.userAgent; '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"); // 换源 img.setAttribute('src', 'https://logos-world.net/wp-content/uploads/2020/09/Google-Logo.png'); // 设置宽高 img.setAttribute('width', '272'); img.setAttribute('height', '150'); // 修改输入内容后页面的图标 let inpImg = document.getElementsByClassName('index-logo-src')[0] // 换源 inpImg.setAttribute('src', 'https://logos-world.net/wp-content/uploads/2020/09/Google-Logo.png'); // 设置宽高 inpImg.setAttribute('title', '谷歌一下') // 需要移除的元素id if (explorer.indexOf("Chrome") >= 0) { needToRemoveElementIds.push('s_mp', 's-top-left', 'bottom_layer', 'lm-new', 's_main') } else if (explorer.indexOf("Firefox") >= 0) { needToRemoveElementIds.push('s-top-left', 'bottom_layer', 's-hotsearch-wrapper', 's_side_wrapper', 's_main'); } // 修改标签标题 document.title = 'Google'; removeElementsById(needToRemoveElementIds); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址