mirror of
https://github.com/DMOJ/online-judge.git
synced 2024-11-25 16:32:37 +08:00
Remove ES6 syntax which breaks prod
Fixes issues introduced in #1797. @int-y1 please refrain from using ES6 in the future if it's unnecessary, especially in .js files.
This commit is contained in:
parent
f9e19d0687
commit
fc25c65afc
@ -40,7 +40,7 @@ $(function () {
|
||||
dataType: 'script',
|
||||
cache: true,
|
||||
success: function () {
|
||||
MathJax.typesetPromise([$content[0]]).then(() => {
|
||||
MathJax.typesetPromise([$content[0]]).then(function () {
|
||||
$content.find('.tex-image').hide();
|
||||
$content.find('.tex-text').show();
|
||||
});
|
||||
@ -49,7 +49,7 @@ $(function () {
|
||||
}
|
||||
});
|
||||
} else {
|
||||
MathJax.typesetPromise([$content[0]]).then(() => {
|
||||
MathJax.typesetPromise([$content[0]]).then(function () {
|
||||
$content.find('.tex-image').hide();
|
||||
$content.find('.tex-text').show();
|
||||
});
|
||||
|
@ -1,7 +1,7 @@
|
||||
jQuery(function ($) {
|
||||
$(document).on('martor:preview', function (e, $content) {
|
||||
function update_math() {
|
||||
MathJax.typesetPromise([$content[0]]).then(() => {
|
||||
MathJax.typesetPromise([$content[0]]).then(function () {
|
||||
$content.find('.tex-image').hide();
|
||||
$content.find('.tex-text').show();
|
||||
});
|
||||
|
@ -28,7 +28,7 @@
|
||||
function update_math($comment) {
|
||||
if ('MathJax' in window) {
|
||||
var $body = $comment.find('.comment-body');
|
||||
MathJax.typesetPromise([$body[0]]).then(() => {
|
||||
MathJax.typesetPromise([$body[0]]).then(function () {
|
||||
$body.find('.tex-image').hide();
|
||||
$body.find('.tex-text').show();
|
||||
});
|
||||
|
@ -1,7 +1,7 @@
|
||||
<script type="text/javascript" src="{{ static('mathjax_config.js') }}"></script>
|
||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.2.0/es5/tex-chtml.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
MathJax.typesetPromise().then(() => {
|
||||
MathJax.typesetPromise().then(function () {
|
||||
$('.tex-image').hide();
|
||||
$('.tex-text').show();
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user