🎉 欢迎访问GreasyFork.Org 镜像站!本镜像站由公众号【爱吃馍】搭建,用于分享脚本。联系邮箱📮

Greasy fork 爱吃馍镜像

baidu2google

增加按钮:切换为谷歌搜索结果

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

🚀 安装遇到问题?关注公众号获取帮助

公众号二维码

扫码关注【爱吃馍】

回复【脚本】获取最新教程和防失联地址

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

🚀 安装遇到问题?关注公众号获取帮助

公众号二维码

扫码关注【爱吃馍】

回复【脚本】获取最新教程和防失联地址

// ==UserScript==
// @name         baidu2google
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  增加按钮:切换为谷歌搜索结果
// @author       You
// @match        *://*.baidu.com/*s?*
// @match        *://*.baidu.com/*search*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

var a=document.getElementsByTagName("body")[0];
var a2=document.createElement("input");
a.appendChild(a2)
a2.value='Google'
a2.style.color='#E1489E'
a2.style.width='60px'
a2.id='bingsr'
a2.style.position = "fixed";
a2.style.left = "0px";
a2.style.top = "70px";
a2.style.border='1px solid #e2e2e4'
//a2.setAttribute("href",url)
a2.setAttribute("readonly",true)
a2.onclick=function(){var str=$('#kw')[0].value;var url='https://www.google.com/search?q='+str;window.location.href=url}
    // Your code here...
})();