MathML Polyfill

Display MathML on unsupported browser, using MathJax

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==UserScript==
// @name         MathML Polyfill
// @name:zh-CN   MathML兼容性改善
// @description  Display MathML on unsupported browser, using MathJax
// @description:zh-CN  使用MathJax在不受支持的浏览器上显示MathML内容
// @namespace    https://greasyfork.org/users/197529
// @version      1.0.0
// @author       kkocdko
// @license      Unlicense
// @match        *://*/*
// ==/UserScript==
"use strict";

if (window.MathMLElement) {
  alert(
    "You don't need this user-script because the current browsers natively support MathML."
  );
} else if (document.querySelector("math")) {
  document.head.appendChild(document.createElement("script")).src =
    "https://cdn.jsdelivr.net/npm/[email protected]/es5/tex-mml-chtml.js";
}