// ==UserScript== // @name 维基增强 // @namespace http://tampermonkey.net/ // @version 0.0.1 // @description 维基增强搜索和公式复制 // @author dengsong2022@gmail.com // @license MIT // @match *://chat.openai.com/* // @match *://*.wikipedia.org/* // @match *://baike.baidu.com/* // @match *://www.zhihu.com/* // @require https://cdn.bootcdn.net/ajax/libs/jquery/3.6.4/jquery.min.js // @icon https://api.iconify.design/logos:xwiki-icon.svg // @grant none // @downloadURL https://update.greasyfork.icu/scripts/466196/%E7%BB%B4%E5%9F%BA%E5%A2%9E%E5%BC%BA.user.js // @updateURL https://update.greasyfork.icu/scripts/466196/%E7%BB%B4%E5%9F%BA%E5%A2%9E%E5%BC%BA.meta.js // ==/UserScript== (function () { "use strict"; var jq = $.noConflict(true); window.MathJax = { tex: { inlineMath: [ ["$", "$"], ["\\(", "\\)"], ], forceReparse: true, }, svg: { fontCache: "global" }, }; jq("head").append(""); // 百度百科 jq("#searchForm > .input-wrap").css("width", "424px"); jq("#searchForm > #search").after(""); jq(".baidubaike-wiki").on({ click: function () { window.open("https://zh.wikipedia.org/wiki/" + jq("#query").val()); return false; }, }); // 知乎 jq(".SearchBar-searchButton").before( '' ); jq(".zhihu-wiki").on({ click: function () { window.open("https://zh.wikipedia.org/wiki/" + jq(".SearchBar-input .Input").val()); return false; }, }); // Your code here... })();