Sha256: 22f5ac160ca955207eb14e9a367ed52742372dd169234ccf1718774f5e99075c

Contents?: true

Size: 986 Bytes

Versions: 18

Compression:

Stored size: 986 Bytes

Contents

// ==UserScript==
// @name           MathJax MathML
// @namespace      http://www.mathjax.org/
// @description    Insert MathJax into pages containing MathML
// @include        *
// ==/UserScript==

if ((window.unsafeWindow == null ? window : unsafeWindow).MathJax == null) {
    if ((document.getElementsByTagName("math").length > 0) ||
	(document.getElementsByTagNameNS == null ? false :
	 (document.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math").length > 0))) {
    var script = document.createElement("script");
    script.src = "http://www.yoursite.edu/MathJax/MathJax.js";  // put your URL here
    var config = 'MathJax.Hub.Config({' +
                   'extensions:["mml2jax.js"],' +
                   'jax:["input/MathML","output/HTML-CSS"]' +
                 '});' +
	'MathJax.Hub.Startup.onload()';
    if (window.opera) {script.innerHTML = config} else {script.text = config}
    document.getElementsByTagName("head")[0].appendChild(script);
    }
}

Version data entries

18 entries across 9 versions & 3 rubygems

Version Path
amiba-1.0.2 lib/amiba/frontend/public/javascript/MathJax/docs/rst/_static/mathjax_mathml.user.js
amiba-1.0.2 lib/amiba/frontend/public/javascript/MathJax/docs/html/_static/mathjax_mathml.user.js
amiba-1.0.1 lib/amiba/frontend/public/javascript/MathJax/docs/html/_static/mathjax_mathml.user.js
amiba-1.0.1 lib/amiba/frontend/public/javascript/MathJax/docs/rst/_static/mathjax_mathml.user.js
amiba-1.0.0 lib/amiba/frontend/public/javascript/MathJax/docs/html/_static/mathjax_mathml.user.js
amiba-1.0.0 lib/amiba/frontend/public/javascript/MathJax/docs/rst/_static/mathjax_mathml.user.js
amiba-0.0.9 lib/amiba/frontend/public/javascript/MathJax/docs/html/_static/mathjax_mathml.user.js
amiba-0.0.9 lib/amiba/frontend/public/javascript/MathJax/docs/rst/_static/mathjax_mathml.user.js
gollum-1.3.1 lib/gollum/frontend/public/javascript/MathJax/docs/html/_static/mathjax_mathml.user.js
gollum-1.3.1 lib/gollum/frontend/public/javascript/MathJax/docs/rst/_static/mathjax_mathml.user.js
jugyo-gollum-1.3.1 lib/gollum/frontend/public/javascript/MathJax/docs/rst/_static/mathjax_mathml.user.js
jugyo-gollum-1.3.1 lib/gollum/frontend/public/javascript/MathJax/docs/html/_static/mathjax_mathml.user.js
gollum-1.2.1 lib/gollum/frontend/public/javascript/MathJax/docs/rst/_static/mathjax_mathml.user.js
gollum-1.2.1 lib/gollum/frontend/public/javascript/MathJax/docs/html/_static/mathjax_mathml.user.js
gollum-1.3.0 lib/gollum/frontend/public/javascript/MathJax/docs/html/_static/mathjax_mathml.user.js
gollum-1.3.0 lib/gollum/frontend/public/javascript/MathJax/docs/rst/_static/mathjax_mathml.user.js
gollum-1.2.0 lib/gollum/frontend/public/javascript/MathJax/docs/rst/_static/mathjax_mathml.user.js
gollum-1.2.0 lib/gollum/frontend/public/javascript/MathJax/docs/html/_static/mathjax_mathml.user.js