Skip to content

Commit afde504

Browse files
authored
Revert "replace external MathJax CDN with local offline-ready version (fixes …" (#598)
This reverts commit 0c1da0e.
1 parent 0c1da0e commit afde504

File tree

5 files changed

+75
-231
lines changed

5 files changed

+75
-231
lines changed

oioioi/base/templates/base.html

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -116,20 +116,7 @@
116116
<script>const oioioi_base_url = "{{ base_url | escapejs }}";</script>
117117
<script src="{% url 'javascript_catalog' %}"></script>
118118
<script src="{% static 'index.bundle.js' %}"></script>
119-
<script>
120-
window.MathJax = {
121-
tex: {
122-
inlineMath: [ ['$','$'], ['\\(','\\)'] ],
123-
displayMath: [ ['$$','$$'], ['\\[','\\]'] ],
124-
processEscapes: true
125-
},
126-
options: {
127-
ignoreHtmlClass: 'tex2jax_ignore',
128-
processHtmlClass: 'tex2jax_process'
129-
}
130-
};
131-
</script>
132-
<script type="text/javascript" id="MathJax-script" src="{% static 'mathjax/tex-chtml.js' %}"></script>
133-
{% endblock %}
119+
<script async src="{{ mathjax_location }}MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
120+
{% endblock %}
134121
</body>
135122
</html>

oioioi/default_settings.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -836,8 +836,9 @@
836836
# for new messages to notify about
837837
MAILNOTIFYD_INTERVAL = 60
838838

839-
# Serve MathJax library from local static files
840-
MATHJAX_LOCATION = '/static/mathjax/tex-chtml.js'
839+
# If your contest has no access to the internet and you need MathJax typesetting,
840+
# either whitelist this link or download your own copy of MathJax and link it here.
841+
MATHJAX_LOCATION = "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/"
841842

842843
# Django message framework CSS classes
843844
# https://docs.djangoproject.com/en/1.9/ref/contrib/messages/#message-tags

0 commit comments

Comments
 (0)