This commit is contained in:
Mirco Wittrien 2019-09-25 17:24:58 +02:00
parent b0c75316b2
commit 6423012f2a
2 changed files with 5 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@ -6324,17 +6324,20 @@ var BDFDB = {myPlugins: BDFDB && BDFDB.myPlugins ? BDFDB.myPlugins : {}, BDv2Api
libraryScript.setAttribute("date", performance.now());
document.head.appendChild(libraryScript);
};
var crashInterval = setInterval(() => {
var keys = Object.keys(BDFDB).length - 10, crashInterval = setInterval(() => {
if (!window.BDFDB || typeof BDFDB != "object" || Object.keys(BDFDB).length < keys || !BDFDB.id) {
console.warn(`%c[BDFDB]%c`, 'color: #3a71c1; font-weight: 700;', '', 'reloading library due to internal error.');
clearInterval(crashInterval);
clearInterval(ndmInterval);
reloadLib();
}
else if (BDFDB.id != id) {
clearInterval(crashInterval);
clearInterval(ndmInterval);
}
else if (!BDFDB.creationTime || performance.now() - BDFDB.creationTime > 18000000) {
clearInterval(crashInterval);
clearInterval(ndmInterval);
reloadLib();
}
},10000);