Fixed bug in PluginRepo
This commit is contained in:
parent
70fbb89771
commit
01a6fa2b01
|
@ -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.";}
|
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";}
|
getAuthor () {return "DevilBro";}
|
||||||
|
|
||||||
|
@ -746,7 +746,7 @@ class PluginRepo {
|
||||||
if (!response) {
|
if (!response) {
|
||||||
if (url && BDFDB.getAllIndexes(this.foundPlugins, url).length < 2) this.foundPlugins.push(url);
|
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 plugin = {};
|
||||||
let bodycopy = body;
|
let bodycopy = body;
|
||||||
if (body.length / body.split("\n").length > 1000) {
|
if (body.length / body.split("\n").length > 1000) {
|
||||||
|
@ -835,10 +835,13 @@ class PluginRepo {
|
||||||
if (!webviewdata) return;
|
if (!webviewdata) return;
|
||||||
webviewrunning = true;
|
webviewrunning = true;
|
||||||
let {body, url} = webviewdata;
|
let {body, url} = webviewdata;
|
||||||
|
console.log({body, url});
|
||||||
let name = body.replace(new RegExp("\\s*\:\\s*", "g"), ":").split('"name":"');
|
let name = body.replace(new RegExp("\\s*\:\\s*", "g"), ":").split('"name":"');
|
||||||
if (name.length > 1) {
|
if (name.length > 1) {
|
||||||
name = name[1].split('"')[0];
|
name = name[1].split('"')[0];
|
||||||
|
console.log("1: " + name);
|
||||||
webview.getWebContents().executeJavaScript(body).then(() => {
|
webview.getWebContents().executeJavaScript(body).then(() => {
|
||||||
|
console.log("2: " + name);
|
||||||
webview.getWebContents().executeJavaScript(`
|
webview.getWebContents().executeJavaScript(`
|
||||||
var p = new ` + name + `();
|
var p = new ` + name + `();
|
||||||
var data = {
|
var data = {
|
||||||
|
@ -849,6 +852,7 @@ class PluginRepo {
|
||||||
};
|
};
|
||||||
Promise.resolve(data);`
|
Promise.resolve(data);`
|
||||||
).then((plugin) => {
|
).then((plugin) => {
|
||||||
|
console.log("3: " + name);
|
||||||
plugin.url = url;
|
plugin.url = url;
|
||||||
this.loadedPlugins[url] = plugin;
|
this.loadedPlugins[url] = plugin;
|
||||||
var installedPlugin = window.bdplugins[plugin.getName] ? window.bdplugins[plugin.getName].plugin : null;
|
var installedPlugin = window.bdplugins[plugin.getName] ? window.bdplugins[plugin.getName].plugin : null;
|
||||||
|
|
|
@ -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/doesNotEqualsInsertion.plugin.js
|
||||||
https://raw.githubusercontent.com/Arashiryuu/crap/master/greenText.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/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/jsMaterialThemeCodeblocks.plugin.js
|
||||||
https://raw.githubusercontent.com/Arashiryuu/crap/master/Miscellanious/statusProfileContainer.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
|
https://raw.githubusercontent.com/Arashiryuu/crap/master/ToastIntegrated/ChatUserIDsRedux/ChatUserIDsRedux.plugin.js
|
||||||
|
|
Loading…
Reference in New Issue