您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
parse latex for wikipedia
- // ==UserScript==
- // @name latex
- // @namespace http://*.*/*
- // @version 0.5
- // @description parse latex for wikipedia
- // @author yulinfeng.mail@foxmail.com
- // @match https://chat.openai.com/*
- // @match https://*.wikipedia.org/*
- // @match https://*.reddit.com/*
- // @match https://*.quora.com/*
- // @match http://*.reddit.com/*
- // @match http://*.quora.com/*
- // @match http://*.wikipedia.org/*
- // @match https://www.bing.com/search?*
- // @grant none
- // ==/UserScript==
- (function() {
- if (window.MathJax === undefined) {
- var script = document.createElement("script");
- script.type = "text/javascript";
- script.src = "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML";
- var config = 'MathJax.Hub.Config({' + 'extensions: ["tex2jax.js"],' + 'tex2jax: { inlineMath: [["$","$"],["\\\\\\\\\\\\(","\\\\\\\\\\\\)"]], displayMath: [["$$","$$"],["\\\\[","\\\\]"]], processEscapes: true },' + 'jax: ["input/TeX","output/HTML-CSS"]' + '});' + 'MathJax.Hub.Startup.onload();';
- if (window.opera) {
- script.innerHTML = config
- } else {
- script.text = config
- }
- document.getElementsByTagName("head")[0].appendChild(script);
- } else {
- MathJax.Hub.Queue(["Typeset", MathJax.Hub]);
- }
- })();