useExternalJs should only apply to internal scripts

This commit is contained in:
Pierre Rudloff 2020-03-23 17:25:35 +01:00
parent b94a94f21a
commit ab8bb3de65
1 changed files with 6 additions and 6 deletions

View File

@ -497,7 +497,7 @@ var tarteaucitron = {
tarteaucitron.cookie.number(); tarteaucitron.cookie.number();
setInterval(tarteaucitron.cookie.number, 60000); setInterval(tarteaucitron.cookie.number, 60000);
} }
}, tarteaucitron.parameters.adblocker); }, tarteaucitron.parameters.adblocker, null, null, true);
if (tarteaucitron.parameters.adblocker === true) { if (tarteaucitron.parameters.adblocker === true) {
setTimeout(function () { setTimeout(function () {
@ -519,8 +519,8 @@ var tarteaucitron = {
} }
}, 1500); }, 1500);
} }
}); }, null, null, null, true);
}); }, null, null, null, true);
if(tarteaucitron.events.load) { if(tarteaucitron.events.load) {
tarteaucitron.events.load(); tarteaucitron.events.load();
@ -1396,7 +1396,7 @@ var tarteaucitron = {
return 'en_US'; return 'en_US';
} }
}, },
"addScript": function (url, id, callback, execute, attrName, attrVal) { "addScript": function (url, id, callback, execute, attrName, attrVal, internal) {
"use strict"; "use strict";
var script, var script,
done = false; done = false;
@ -1430,7 +1430,7 @@ var tarteaucitron = {
} }
} }
if ( !tarteaucitron.parameters.useExternalJs ) { if ( !tarteaucitron.parameters.useExternalJs || !internal ) {
document.getElementsByTagName('head')[0].appendChild(script); document.getElementsByTagName('head')[0].appendChild(script);
} }
} }
@ -1470,7 +1470,7 @@ var tarteaucitron = {
tarteaucitron.makeAsync.buffer = ''; tarteaucitron.makeAsync.buffer = '';
tarteaucitron.makeAsync.execJS(id); tarteaucitron.makeAsync.execJS(id);
} }
}); }, null, null, null, true);
}, },
"execJS": function (id) { "execJS": function (id) {
/* not strict because third party scripts may have errors */ /* not strict because third party scripts may have errors */