summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorROUVREAU Vincent <vincent.rouvreau@inria.fr>2019-06-07 15:50:31 +0200
committerROUVREAU Vincent <vincent.rouvreau@inria.fr>2019-06-07 15:50:31 +0200
commit18e07282a3b9b1e8616ca871d79d7dc820e94a85 (patch)
tree9756feed82e871bf37bdf09e02c8675e1aed441a /src
parent3807bd77af3d03beace12305ef866cb6172e1f82 (diff)
MathJax.js no more required
Diffstat (limited to 'src')
-rw-r--r--src/common/doc/MathJax.js53
1 files changed, 0 insertions, 53 deletions
diff --git a/src/common/doc/MathJax.js b/src/common/doc/MathJax.js
deleted file mode 100644
index 35e1994e..00000000
--- a/src/common/doc/MathJax.js
+++ /dev/null
@@ -1,53 +0,0 @@
-(function () {
- var newMathJax = 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js';
- var oldMathJax = 'cdn.mathjax.org/mathjax/latest/MathJax.js';
-
- var replaceScript = function (script, src) {
- //
- // Make redirected script
- //
- var newScript = document.createElement('script');
- newScript.src = newMathJax + src.replace(/.*?(\?|$)/, '$1');
- //
- // Move onload and onerror handlers to new script
- //
- newScript.onload = script.onload;
- newScript.onerror = script.onerror;
- script.onload = script.onerror = null;
- //
- // Move any content (old-style configuration scripts)
- //
- while (script.firstChild) newScript.appendChild(script.firstChild);
- //
- // Copy script id
- //
- if (script.id != null) newScript.id = script.id;
- //
- // Replace original script with new one
- //
- script.parentNode.replaceChild(newScript, script);
- //
- // Issue a console warning
- //
- console.warn('WARNING: cdn.mathjax.org has been retired. Check https://www.mathjax.org/cdn-shutting-down/ for migration tips.')
- }
-
- if (document.currentScript) {
- var script = document.currentScript;
- replaceScript(script, script.src);
- } else {
- //
- // Look for current script by searching for one with the right source
- //
- var n = oldMathJax.length;
- var scripts = document.getElementsByTagName('script');
- for (var i = 0; i < scripts.length; i++) {
- var script = scripts[i];
- var src = (script.src || '').replace(/.*?:\/\//,'');
- if (src.substr(0, n) === oldMathJax) {
- replaceScript(script, src);
- break;
- }
- }
- }
-})(); \ No newline at end of file