Fix TeX Preview not being typeset if MathJax wasn't loaded when the button was pressed.
This commit is contained in:
parent
ca6b6994a7
commit
7f2b9bae8f
@ -37,6 +37,11 @@ Fourchan =
|
|||||||
if (!document.querySelector('script[src^="//cdn.mathjax.org/"]')) {
|
if (!document.querySelector('script[src^="//cdn.mathjax.org/"]')) {
|
||||||
window.loadMathJax();
|
window.loadMathJax();
|
||||||
window.loadMathJax = function() {};
|
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);
|
}, false);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user