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

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

目前为 2018-03-27 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name 百度百科增其他网络百科跳转
  3. // @version 0.9
  4. // @description 在百度百科中添加跳转到其他网络百科的按钮
  5. // @match *://baike.baidu.com/*
  6. // @grant 源码来自【sunforbeeing】的【百度百科添加维基镜像】,进行一些修改
  7. // @author 太史子义慈
  8. // @require https://code.jquery.com/jquery-3.1.1.min.js
  9. // @namespace https://gf.qytechs.cn/users/176720
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. //搜索栏调整
  14. $('.header .layout').css('width', '95%');
  15. $('.wgt-searchbar-main').css('width', '100%');
  16. $('.search .form input').css('width', '400px');
  17. $('.search .form .help').remove();
  18. $('.wgt-userbar').css({
  19. 'position': 'static',
  20. 'float': 'right'
  21. });
  22. //页面清理
  23. $('.new-side-share').remove(); //分享
  24. $('.lemmaWgt-promotion-vbaike').remove(); //V百科
  25. $('.wgt-footer-main .content').remove(); //页面底部
  26. $('.after-content').remove(); //页面底部
  27. //添加360百科词条
  28. $('#searchForm #search').after('<button class="qihu" type="button" style="width:51px;">360</button>');
  29. $('.qihu').click(function() {
  30. window.open("https://baike.so.com/search/?q=" + $('#query').val());
  31. });
  32. //添加互动百科词条
  33. $('#searchForm #search').after('<button class="hudong" type="button" style="width:51px;">互动</button>');
  34. $('.hudong').click(function() {
  35. window.open("http://www.baike.com/wiki/" + $('#query').val());
  36. });
  37. //添加国搜百科词条
  38. $('#searchForm #search').after('<button class="chinaso" type="button" style="width:51px;">国搜</button>');
  39. $('.chinaso').click(function() {
  40. window.open("http://baike.chinaso.com/wiki/search?q=" + $('#query').val());
  41. });
  42. //添加搜狗百科词条
  43. $('#searchForm #search').after('<button class="sougou" type="button" style="width:51px;">搜狗</button>');
  44. $('.sougou').click(function() {
  45. window.open("http://baike.sogou.com/Search.e?sp=S" + $('#query').val());
  46. });
  47. //添加维基百科词条
  48. $('#searchForm #search').after('<button class="wiki" type="button" style="width:51px;">维基</button>');
  49. $('.wiki').click(function() {
  50. window.open("https://zh.wikipedia.org/w/index.php?search=" + $('#query').val());
  51. });
  52. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址