// ==UserScript== // @name 百度增强搜索 // @description 给百度搜索引擎的结果页一键跳转到其他网站进行相同关键词的检索;在google搜索结果页一键跳转到百度搜索进行相同关键词的检索。 // @icon https://www.baidu.com/cache/icon/favicon.ico // @namespace https://github.com/fanjindui/TemperMonkeyCollection/tree/main/%E7%99%BE%E5%BA%A6%E6%90%9C%E7%B4%A2%E5%A2%9E%E5%BC%BA // @version 2.0 // @author fanfan // @run-at document-start // @include http*://*baidu.com/s* // @include http*://*baidu.com/baidu* // @include *://www.google.com/search?* // @include *://www.google.com.*/search?* // @require https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js // @connect cdn.jsdelivr.net // @grant GM_addStyle // @grant GM_getResourceText // @grant GM_setValue // @grant GM_getValue // @grant GM_deleteValue // @grant GM_registerMenuCommand // @grant GM_xmlhttpRequest // @grant GM_download // @note 参考ddrwin作品,地址https://greasyfork.org/zh-CN/scripts/396960-baidu-%E4%B8%BA%E7%99%BE%E5%BA%A6%E6%90%9C%E7%B4%A2%E7%BB%93%E6%9E%9C%E9%A1%B5%E6%B7%BB%E5%8A%A0%E7%A3%81%E5%8A%9B-%E7%A7%8D%E5%AD%90-%E7%BD%91%E7%9B%98-%E8%BD%AF%E4%BB%B6-%E5%A4%B4%E6%9D%A1-%E5%93%94%E5%93%A9%E5%93%94%E5%93%A9-%E7%9F%A5%E4%B9%8E-csdn-google%E6%90%9C%E7%B4%A2%E6%8C%89%E9%92%AE-%E4%B8%BAgoogle%E6%B7%BB%E5%8A%A0%E7%99%BE%E5%BA%A6%E6%90%9C%E7%B4%A2%E6%8C%89%E9%92%AE // @downloadURL https://update.greasyfork.icu/scripts/413284/%E7%99%BE%E5%BA%A6%E5%A2%9E%E5%BC%BA%E6%90%9C%E7%B4%A2.user.js // @updateURL https://update.greasyfork.icu/scripts/413284/%E7%99%BE%E5%BA%A6%E5%A2%9E%E5%BC%BA%E6%90%9C%E7%B4%A2.meta.js // ==/UserScript== (function() { 'use strict'; var hostname = window.location.hostname; if(hostname.match(RegExp(/baidu.com/))){ // 在百度结果首页开始添加按钮 var config; $.getJSON("https://cdn.jsdelivr.net/gh/fanjindui/TemperMonkeyCollection@main/%E7%99%BE%E5%BA%A6%E6%90%9C%E7%B4%A2%E5%A2%9E%E5%BC%BA/config.json", function(result){ config=result["data"] }); document.addEventListener ("DOMContentLoaded",show_button_baidu); function show_button_baidu () { //alert(config); //设置css var style = document.createElement("style"); style.type = "text/css"; var styleText = ".btn {float:right; font-size:14px; text-align:center; text-decoration:none; width:80px; line-height:33px; margin:1px 0 0 0; -webkit-appearance:none; -webkit-border-radius:0; border: 0; color:#fff; letter-spacing:1px; background:#4e6ef2; border:1px solid rgba(255,255,255,0.3); outline:medium;}"; styleText = styleText + ".btn .llst {display:none; width:100px; height:35px; float:left; background-color:rgba(255,255,255,0.1); }"; styleText = styleText + ".btn:hover {background:#3385ff; width:100px; padding-bottom:10px;}"; styleText = styleText + ".btn:hover .llst {display:block; }"; styleText = styleText + ".bbtn {height:35px; width:99px; background-color:rgba(255,255,255,0.1); border:none; color:white; }"; styleText = styleText + ".bbtn:hover {background-color:rgba(255,255,255,0.3);}"; style.innerHTML = styleText; $(".s_form_wrapper").append(style); //添加其他搜索按钮 var schText = '