Cloned DMOJ

This commit is contained in:
thanhluong 2020-01-21 15:35:58 +09:00
parent f623974b58
commit 49dc9ff10c
513 changed files with 132349 additions and 39 deletions

View file

@ -0,0 +1,17 @@
function mathjax_pagedown($) {
if ('MathJax' in window) {
$.each(window.editors, function (id, editor) {
var preview = $('div.wmd-preview#' + id + '_wmd_preview')[0];
editor.hooks.chain('onPreviewRefresh', function () {
MathJax.Hub.Queue(["Typeset", MathJax.Hub, preview]);
});
MathJax.Hub.Queue(["Typeset", MathJax.Hub, preview]);
});
}
}
window.mathjax_pagedown = mathjax_pagedown;
$(window).load(function () {
(mathjax_pagedown)('$' in window ? $ : django.jQuery);
});