|
|
|
@ -2,10 +2,8 @@
|
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
|
* Adapted from: https://github.com/fred-wang/mathml.css */
|
|
|
|
|
/*jslint browser: true*/
|
|
|
|
|
|
|
|
|
|
(function () {
|
|
|
|
|
"use strict";
|
|
|
|
|
window.addEventListener("load", function() {
|
|
|
|
|
var box, div, link, namespaceURI;
|
|
|
|
|
// First check whether the page contains any <math> element.
|
|
|
|
@ -16,11 +14,7 @@
|
|
|
|
|
box = div.firstChild.firstChild.getBoundingClientRect();
|
|
|
|
|
document.body.removeChild(div);
|
|
|
|
|
if (Math.abs(box.height - 23) > 1 || Math.abs(box.width - 77) > 1) {
|
|
|
|
|
// Insert the mathml.css stylesheet.
|
|
|
|
|
link = document.createElement("link");
|
|
|
|
|
link.href = "https://cdn.devdocs.io/mathml.css";
|
|
|
|
|
link.rel = "stylesheet";
|
|
|
|
|
document.head.appendChild(link);
|
|
|
|
|
window.supportsMathML = false;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}());
|
|
|
|
|