您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Uses MathJax to properly display LaTeX code, on any site
This simple script uses mathjax to process any suitably delimited ($
for inline, $$
or \[
for display) latex mathematical code into how latex would display it.
See the mathjax website for details.
This is tested and working very well with gmail but designed to be general purpose—you just need to add the domain you want to the script's matches.
In order that this script works, it needs to be able to load mathjax from cdnjs.cloudflare.com. However, a number of websites use Content Security Policy (CSP) which prevents all scripts being loaded from any domain apart from those the site owners have listed in the CSP header of the HTTP response of the webpage.
I don't know how many websites use CSP (or use it in a way that will stop this script from loading specifically). However, gmail does. You can switch off CSP in Firefox, and there are add-ons for both Chrome and Firefox to change CSP for specific sites; however, with gmail, I've personally only been able to get it to work by disabling CSP.
I'm not an expert scripter in the slightest, so this isn't necessarily a very robust piece of code. But it works very nicely for my purposes, and I had previously looked around and hadn't found anything similar that was already available. You should probably be using a modern browser.
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址