Update 0BDFDB.plugin.js

This commit is contained in:
Mirco Wittrien 2020-09-11 18:36:42 +02:00
parent 213c0079cf
commit 3dcbdc768a
1 changed files with 6719 additions and 6714 deletions

View File

@ -511,7 +511,10 @@ module.exports = (_ => {
}
}, config, window.BDFDB_Global);
const loadLibrary = tryAgain => {
require("request").get("https://mwittrien.github.io/BetterDiscordAddons/Library/_res/BDFDB.data.json", BDFDB.TimeUtils.suppress((error, response, body) => {
if ((error || !body) && tryAgain) return BDFDB.TimeUtils.timeout(_ => {loadLibrary();}, 10000);
const InternalData = JSON.parse(body);
BDFDB.ObserverUtils = {};
@ -7448,7 +7451,9 @@ module.exports = (_ => {
while (PluginStores.delayedLoad.length) PluginStores.delayedLoad.shift().load();
while (PluginStores.delayedStart.length) PluginStores.delayedStart.shift().start();
while (pluginQueue.length) BDFDB.BDUtils.reloadPlugin(pluginQueue.shift());
}, "Could not initiate library!", config.name));
}, "Could not initiate library!", config.name))
};
loadLibrary(true);
return class BDFDB_Frame {
getName () {return config.name;}