(mathJaxChallenge = true)
| 36 | }; |
| 37 | |
| 38 | export const initializeMathJax = (mathJaxChallenge = true) => { |
| 39 | const mathJaxMountPoint = document.querySelector('#mathjax'); |
| 40 | if (global.MathJax) { |
| 41 | // Configure MathJax when it's loaded and |
| 42 | // users navigate from another challenge |
| 43 | configure(); |
| 44 | } else if (!mathJaxMountPoint && mathJaxChallenge) { |
| 45 | mathJaxScriptLoader(); |
| 46 | } |
| 47 | }; |
| 48 | |
| 49 | const mathJaxScriptLoader = () => { |
| 50 | scriptLoader('mathjax', false, mathJaxSrc, configure, ''); |
no test coverage detected