Files
edx-platform/lms/static/js/mathjax_accessible.js
Michael Terry a34c8c8233 Drop remaining coffee use
This basically commits the transpiled CoffeeScript JS (with minor
cleanup) and removes coffee build support.

A tiny amount of support for xblocks exists, because external users
may have xblocks with coffee. But no coffee in our tree anyway.
2018-04-13 14:10:40 -04:00

38 lines
1.2 KiB
JavaScript

// Once generated by CoffeeScript 1.9.3, but now lives as pure JS
/* eslint-disable */
(function() {
$(function() {
var isMPInstalled;
if (window.navigator.appName === "Microsoft Internet Explorer") {
isMPInstalled = function(boolean) {
var e, oMP;
/*
check if MathPlayer is installed
(from http://www.dessci.com/en/products/mathplayer/check.htm)
*/
try {
oMP = new ActiveXObject("MathPlayer.Factory.1");
return true;
} catch (_error) {
e = _error;
return false;
}
};
/*
detect if there is mathjax on the page
if not, set 'aria-hidden' to 'true'
*/
if ((typeof MathJax !== "undefined" && MathJax !== null) && !isMPInstalled()) {
$("#mathjax-accessibility-message").attr("aria-hidden", "false");
}
if ((typeof MathJax !== "undefined" && MathJax !== null) && $("#mathplayer-browser-message").length > 0) {
return $("#mathplayer-browser-message").attr("aria-hidden", "false");
} else {
return $("#mathjax-accessibility-message").attr("aria-hidden", "true");
}
}
});
}).call(this);