Prevent looping
This commit is contained in:
parent
17a23f664d
commit
10ff24c661
|
|
@ -584,6 +584,7 @@ var tarteaucitron = {
|
||||||
document.getElementsByTagName('head')[0].appendChild(script);
|
document.getElementsByTagName('head')[0].appendChild(script);
|
||||||
},
|
},
|
||||||
"makeAsync": {
|
"makeAsync": {
|
||||||
|
"antiGhost": 0,
|
||||||
"buffer": '',
|
"buffer": '',
|
||||||
"init": function (url, id) {
|
"init": function (url, id) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
@ -606,6 +607,10 @@ var tarteaucitron = {
|
||||||
},
|
},
|
||||||
"getAndParse": function (url, id) {
|
"getAndParse": function (url, id) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
if (tarteaucitron.makeAsync.antiGhost > 10) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
tarteaucitron.makeAsync.antiGhost += 1;
|
||||||
tarteaucitron.addScript(url, '', function () {
|
tarteaucitron.addScript(url, '', function () {
|
||||||
document.getElementById(id).innerHTML += tarteaucitron.makeAsync.buffer;
|
document.getElementById(id).innerHTML += tarteaucitron.makeAsync.buffer;
|
||||||
tarteaucitron.makeAsync.buffer = '';
|
tarteaucitron.makeAsync.buffer = '';
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue