If coming from the CDN's mathjax/latest address, move to the explicit version (avoids CDN propagation issues when a new version is released).

This commit is contained in:
Davide P. Cervone 2013-11-16 20:22:19 -05:00
parent 705548fc37
commit 8700fdf098

View File

@ -2943,7 +2943,9 @@ MathJax.Hub.Startup = {
if (KV) {STARTUP.params[unescape(KV[1])] = unescape(KV[2])}
}
}
CONFIG.root = scripts[i].src.replace(/(^|\/)[^\/]*(\?.*)?$/,'');
CONFIG.root = scripts[i].src.replace(/(^|\/)[^\/]*(\?.*)?$/,'')
.replace(/^(https?:\/\/(cdn.mathjax.org|c328740.ssl.cf1.rackcdn.com)\/mathjax\/)(latest)/,
"$1"+BASE.version+"-$3");
break;
}
}