Fix TeX Preview not being typeset if MathJax wasn't loaded when the button was pressed.

This commit is contained in:
ccd0 2015-10-30 15:15:01 -07:00
parent ca6b6994a7
commit 7f2b9bae8f

View File

@ -37,6 +37,11 @@ Fourchan =
if (!document.querySelector('script[src^="//cdn.mathjax.org/"]')) {
window.loadMathJax();
window.loadMathJax = function() {};
if (!e.target.classList.contains('postMessage')) {
document.querySelector('script[src^="//cdn.mathjax.org/"]').addEventListener('load', function() {
window.MathJax.Hub.Queue(['Typeset', window.MathJax.Hub, e.target]);
}, false);
}
}
}
}, false);