Greasy Fork is available in English.
在百度百科中添加跳转到其他网络百科的按钮
当前为
// ==UserScript==
// @name 百度百科增其他网络百科跳转
// @version 0.8
// @description 在百度百科中添加跳转到其他网络百科的按钮
// @match *://baike.baidu.com/*
// @grant 源码来自【sunforbeeing】的【百度百科添加维基镜像】,进行一些修改
// @author 太史子义慈
// @require https://code.jquery.com/jquery-3.1.1.min.js
// @namespace http://greasyfork.icu/users/176720
// ==/UserScript==
(function() {
//搜索栏调整
$('.header .layout').css('width', '95%');
$('.wgt-searchbar-main').css('width', '100%');
$('.search .form input').css('width', '400px');
$('.search .form .help').remove();
$('.wgt-userbar').css({
'position': 'static',
'float': 'right'
});
//页面清理
$('.new-side-share').remove(); //分享
$('.lemmaWgt-promotion-vbaike').remove(); //V百科
$('.wgt-footer-main .content').remove(); //页面底部
$('.after-content').remove(); //页面底部
//添加360百科词条
$('#searchForm #search').after('<button class="qihu" type="button" >360</button>');
$('.qihu').click(function() {
window.open("https://baike.so.com/search/?q=" + $('#query').val());
});
//添加互动百科词条
$('#searchForm #search').after('<button class="hudong" type="button" >互动</button>');
$('.hudong').click(function() {
window.open("http://www.baike.com/wiki/" + $('#query').val());
});
//添加国搜百科词条
$('#searchForm #search').after('<button class="chinaso" type="button" >国搜</button>');
$('.chinaso').click(function() {
window.open("http://baike.chinaso.com/wiki/search?q=" + $('#query').val());
});
//添加搜狗百科词条
$('#searchForm #search').after('<button class="sougou" type="button" >搜狗</button>');
$('.sougou').click(function() {
window.open("http://baike.sogou.com/Search.e?sp=S" + $('#query').val());
});
//添加维基百科词条
$('#searchForm #search').after('<button class="wiki" type="button" >维基</button>');
$('.wiki').click(function() {
window.open("https://zh.wikipedia.org/w/index.php?search=" + $('#query').val());
});
})();