##// END OF EJS Templates
remove unnecessary onload hack from mathjax macro
MinRK -
Show More
@@ -1,4 +1,6 b''
1 {%- macro mathjax() -%}
1 {%- macro mathjax() -%}
2 <!-- Load mathjax -->
3 <script src="https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS_HTML"></script>
2 <!-- MathJax configuration -->
4 <!-- MathJax configuration -->
3 <script type="text/x-mathjax-config">
5 <script type="text/x-mathjax-config">
4 MathJax.Hub.Config({
6 MathJax.Hub.Config({
@@ -18,19 +20,4 b''
18 });
20 });
19 </script>
21 </script>
20 <!-- End of mathjax configuration -->
22 <!-- End of mathjax configuration -->
21
22 <script>
23 // We wait for the onload function to load MathJax after the page is completely loaded.
24 // MathJax is loaded 1 unit of time after the page is ready.
25 // This hack prevent problems when you load multiple js files.
26
27 window.onload = function () {
28 setTimeout(function () {
29 var script = document.createElement("script");
30 script.type = "text/javascript";
31 script.src = "https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS_HTML";
32 document.getElementsByTagName("head")[0].appendChild(script);
33 },1)
34 }
35 </script>
36 {%- endmacro %} No newline at end of file
23 {%- endmacro %}
General Comments 0
You need to be logged in to leave comments. Login now