Skip to content

Commit

Permalink
offer MathJax via https using new cdn
Browse files Browse the repository at this point in the history
The web dev world now recommends just using https instead of
protocol-relative links — and MathJax now has a sane domain name for
their https CDN.

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Apr 23, 2015
1 parent dda6595 commit 4e983b8
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions nikola/data/themes/base/assets/js/mathjax.js
Expand Up @@ -5,12 +5,7 @@
window.onload = function () {
setTimeout(function () {
var script = document.createElement("script");
if (location.protocol == 'https:') {
scriptbase = "https://c328740.ssl.cf1.rackcdn.com/";
} else {
scriptbase = "http://cdn.mathjax.org/";
}
script.src = scriptbase + "mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML";
script.src = "https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML";
document.getElementsByTagName("body")[0].appendChild(script);
},1)
}

0 comments on commit 4e983b8

Please sign in to comment.