您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
🐶把百度搜索伪装成谷歌搜索
当前为
// ==UserScript== // @name 🔥百度主页伪装成谷歌🔥 // @namespace com.zhaolei // @version 0.5 // @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_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 if (explorer.indexOf("Chrome") >= 0) { needToRemoveElementIds.push('s_mp', 's-top-left', 'bottom_layer', 'lm-new') } else if (explorer.indexOf("Firefox") >= 0) { needToRemoveElementIds.push('s-top-left', 'bottom_layer', 's-hotsearch-wrapper', 's_side_wrapper'); } document.title = 'Google😉'; removeElementsById(needToRemoveElementIds); })();