Greasy Fork

Shined up real nice.

KaTeX

KaTeX 修改版, 可以工作与 兼容模式.可能会出现Bug.效果未知

This script should not be not be installed directly. It is a library for other scripts to include with the meta directive // @require https://greasyfork.org/scripts/34253-katex/code/KaTeX.js?version=224512

Advertisement
Author
黄盐
Ratings
0 0 0
Version
0.0.1.20171017210240
Created
Updated
License
N/A
Applies to
All sites

Author's Description

在源文件中,我禁用了以下代码,使得 KaTeX 在兼容模式下也能够使用.但是会出现什么错误将无法预知.


if (typeof document !== "undefined") {
    if (document.compatMode !== "CSS1Compat") {
        typeof console !== "undefined" && console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your " + 
         "website has a suitable doctype.");
        render = function render() {
            throw new _ParseError2.default("KaTeX doesn't work in quirks mode.");
        };
    }
}
官网:https://khan.github.io/KaTeX/