您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
当前为
// ==UserScript== // @name google with baidu // @namespace https://github.com/kana112233/Tampermonkey-user-js // @version 1.0.0 // @description:en google with baidu ok // @author makey // @grant GM_openInTab // @include https://www.google.com/* // @require https://cdn.staticfile.org/jquery/1.12.4/jquery.min.js // ==/UserScript== (function() { 'use strict'; function getBaiduOnceUrl(searchText) { return 'https://www.baidu.com/s?wd=' + searchText; } function BaiduOnce() { var searchText = document.querySelector('.gLFyf').value; GM_openInTab( getBaiduOnceUrl(searchText), false); } $('#gbqfbb').after('<input type="button" id="baiduId" value="百度一下" class="btn self-btn bg s_btn" style="background-color:#f2f2f2;border:1px solid #f2f2f2;border-radius: 4px;width:142.5px;height:36px" />'); $('#hdtb-msb').after('<input type="button" id="baiduId" value="百度一下" class="btn self-btn bg s_btn" style="background-color:#f2f2f2;border:1px solid #f2f2f2;border-radius: 4px;width:142.5px;height:36px" />'); $("#baiduId").click(function() { BaiduOnce(); }); })();