cclaerhout
Well-known member
Ref:
It shouldn't be needed anymore, and I'm not sure how it was used without tinyMCEPreInit. May be a very old code then.
Code:
scriptLoader:
{
loadScript: function(url, success, failure)
{
if (XenForo._loadedScripts[url] === undefined)
{
if (/tiny_mce[a-zA-Z0-9_-]*\.js/.test(url))
{
var preInit = {suffix: '', base: '', query: ''},
baseHref = XenForo.baseUrl();
if (/_(src|dev)\.js/g.test(url))
{
preInit.suffix = '_src';
}
if ((p = url.indexOf('?')) != -1)
{
preInit.query = url.substring(p + 1);
}
preInit.base = url.substring(0, url.lastIndexOf('/'));
if (baseHref && preInit.base.indexOf('://') == -1 && preInit.base.indexOf('/') !== 0)
preInit.base = baseHref + preInit.base;
}
Upvote
2