From 33a126552db10c0b5c1eddb8e27906d8fbf7adfd Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Fri, 12 Feb 2021 10:08:36 +0100 Subject: [PATCH] Update 0BDFDB.plugin.js --- Library/0BDFDB.plugin.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Library/0BDFDB.plugin.js b/Library/0BDFDB.plugin.js index 487365a286..1b0755c1e4 100644 --- a/Library/0BDFDB.plugin.js +++ b/Library/0BDFDB.plugin.js @@ -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) {