From 01a6fa2b01099e477613712d4a8a9a9cf99ef30b Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Wed, 12 Dec 2018 12:21:24 +0100 Subject: [PATCH] Fixed bug in PluginRepo --- Plugins/PluginRepo/PluginRepo.plugin.js | 10 +++++++--- Plugins/PluginRepo/res/PluginList.txt | 1 - 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Plugins/PluginRepo/PluginRepo.plugin.js b/Plugins/PluginRepo/PluginRepo.plugin.js index 5e807f56d1..20fe16911b 100644 --- a/Plugins/PluginRepo/PluginRepo.plugin.js +++ b/Plugins/PluginRepo/PluginRepo.plugin.js @@ -239,7 +239,7 @@ class PluginRepo { getDescription () {return "Allows you to look at all plugins from the plugin repo and download them on the fly. Repo button is in the plugins settings.";} - getVersion () {return "1.6.1";} + getVersion () {return "1.6.2";} getAuthor () {return "DevilBro";} @@ -746,7 +746,7 @@ class PluginRepo { if (!response) { if (url && BDFDB.getAllIndexes(this.foundPlugins, url).length < 2) this.foundPlugins.push(url); } - else { + else if (body.indexOf("404: Not Found") != 0) { let plugin = {}; let bodycopy = body; if (body.length / body.split("\n").length > 1000) { @@ -835,11 +835,14 @@ class PluginRepo { if (!webviewdata) return; webviewrunning = true; let {body, url} = webviewdata; + console.log({body, url}); let name = body.replace(new RegExp("\\s*\:\\s*", "g"), ":").split('"name":"'); if (name.length > 1) { name = name[1].split('"')[0]; + console.log("1: " + name); webview.getWebContents().executeJavaScript(body).then(() => { - webview.getWebContents().executeJavaScript(` + console.log("2: " + name); + webview.getWebContents().executeJavaScript(` var p = new ` + name + `(); var data = { "getName":p.getName(), @@ -849,6 +852,7 @@ class PluginRepo { }; Promise.resolve(data);` ).then((plugin) => { + console.log("3: " + name); plugin.url = url; this.loadedPlugins[url] = plugin; var installedPlugin = window.bdplugins[plugin.getName] ? window.bdplugins[plugin.getName].plugin : null; diff --git a/Plugins/PluginRepo/res/PluginList.txt b/Plugins/PluginRepo/res/PluginList.txt index 35fd9fab88..531b37c866 100644 --- a/Plugins/PluginRepo/res/PluginList.txt +++ b/Plugins/PluginRepo/res/PluginList.txt @@ -9,7 +9,6 @@ https://raw.githubusercontent.com/Anxeal/BDEnhancements/master/plugins/ResizeX/R https://raw.githubusercontent.com/Arashiryuu/crap/master/doesNotEqualsInsertion.plugin.js https://raw.githubusercontent.com/Arashiryuu/crap/master/greenText.plugin.js https://raw.githubusercontent.com/Arashiryuu/crap/master/Miscellanious/backtickInsertion.plugin.js -https://raw.githubusercontent.com/Arashiryuu/crap/master/Miscellanious/catImg.plugin.js https://raw.githubusercontent.com/Arashiryuu/crap/master/Miscellanious/jsMaterialThemeCodeblocks.plugin.js https://raw.githubusercontent.com/Arashiryuu/crap/master/Miscellanious/statusProfileContainer.plugin.js https://raw.githubusercontent.com/Arashiryuu/crap/master/ToastIntegrated/ChatUserIDsRedux/ChatUserIDsRedux.plugin.js