mathjax.js 669 B

12345678910111213141516
  1. // We wait for the onload function to load MathJax after the page is completely loaded.
  2. // MathJax is loaded 1 unit of time after the page is ready.
  3. // This hack prevent problems when you use social button from addthis.
  4. //
  5. window.onload = function () {
  6. setTimeout(function () {
  7. var script = document.createElement("script");
  8. if (location.protocol == 'https:') {
  9. scriptbase = "https://c328740.ssl.cf1.rackcdn.com/";
  10. } else {
  11. scriptbase = "http://cdn.mathjax.org/";
  12. }
  13. script.src = scriptbase + "mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML";
  14. document.getElementsByTagName("body")[0].appendChild(script);
  15. },1)
  16. }