mirror of
https://github.com/DMOJ/online-judge.git
synced 2024-11-25 16:32:37 +08:00
c126f07fe7
This reverts commits: -2035e606f3
-ce1196f74f
Since they do not interact well with dark mode.
20 lines
577 B
JavaScript
20 lines
577 B
JavaScript
function mathjax_pagedown($) {
|
|
if ('MathJax' in window) {
|
|
$.each(window.editors, function (id, editor) {
|
|
var preview = $('div.wmd-preview#' + id + '_wmd_preview')[0];
|
|
if (preview) {
|
|
editor.hooks.chain('onPreviewRefresh', function () {
|
|
MathJax.typeset([preview]);
|
|
});
|
|
MathJax.typeset([preview]);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
window.mathjax_pagedown = mathjax_pagedown;
|
|
|
|
$(window).on('load', function () {
|
|
(mathjax_pagedown)('$' in window ? $ : django.jQuery);
|
|
});
|