Greasy Fork is available in English.

百度百科增其他网络百科跳转

在百度百科中添加跳转到其他网络百科的按钮

Verze ze dne 27. 03. 2018. Zobrazit nejnovější verzi.

// ==UserScript==
// @name         百度百科增其他网络百科跳转
// @version      0.7
// @description  在百度百科中添加跳转到其他网络百科的按钮
// @match        *://baike.baidu.com/*
// @grant        源码来自【sunforbeeing】的【百度百科添加维基镜像】,进行一些修改
// @author       太史子义慈
// @require      https://code.jquery.com/jquery-3.1.1.min.js
// @namespace    https://greasyfork.org/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());
	});
})();