MathML兼容性改善

使用MathJax在不受支持的浏览器上显示MathML内容

  1. // ==UserScript==
  2. // @name MathML Polyfill
  3. // @name:zh-CN MathML兼容性改善
  4. // @description Display MathML on unsupported browser, using MathJax
  5. // @description:zh-CN 使用MathJax在不受支持的浏览器上显示MathML内容
  6. // @namespace https://gf.qytechs.cn/users/197529
  7. // @version 1.0.0
  8. // @author kkocdko
  9. // @license Unlicense
  10. // @match *://*/*
  11. // ==/UserScript==
  12. "use strict";
  13.  
  14. if (window.MathMLElement) {
  15. alert(
  16. "You don't need this user-script because the current browsers natively support MathML."
  17. );
  18. } else if (document.querySelector("math")) {
  19. document.head.appendChild(document.createElement("script")).src =
  20. "https://cdn.jsdelivr.net/npm/mathjax@3.0.5/es5/tex-mml-chtml.js";
  21. }

QingJ © 2025

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