Update 0BDFDB.plugin.js

This commit is contained in:
Mirco Wittrien 2021-02-12 10:08:36 +01:00
parent e510033f7b
commit 33a126552d
1 changed files with 3 additions and 2 deletions

View File

@ -656,15 +656,16 @@ module.exports = (_ => {
});
};
BDFDB.PluginUtils.hasUpdateCheck = function (url) {
if (!url || typeof url != "string") return false;
let updateStore = Object.assign({}, window.PluginUpdates && window.PluginUpdates.plugins, PluginStores.updateData.plugins);
if (updateStore[url]) return true;
else {
let temp = "https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/PluginRepo/PluginRepo.plugin.js".replace("//raw.githubusercontent.com", "//").split("/");
let temp = url.replace("//raw.githubusercontent.com", "//").split("/");
let gitName = temp.splice(3, 1);
temp.splice(4, 1);
temp.splice(2, 1, gitName + ".github.io");
let pagesUrl = temp.join("/");
return updateStore[pagesUrl];
return !!updateStore[pagesUrl];
}
};
BDFDB.PluginUtils.showUpdateNotice = function (pluginName, url) {