stuff
This commit is contained in:
parent
40900171e3
commit
a0d3ba458e
|
@ -834,9 +834,8 @@ class PluginRepo {
|
||||||
}
|
}
|
||||||
|
|
||||||
checkForNewPlugins () {
|
checkForNewPlugins () {
|
||||||
let request = require("request");
|
require("request")("https://mwittrien.github.io/BetterDiscordAddons/Plugins/PluginRepo/res/PluginList.txt", (error, response, result) => {
|
||||||
request("https://mwittrien.github.io/BetterDiscordAddons/Plugins/PluginRepo/res/PluginList.txt", (error, response, result) => {
|
if (response && !BDFDB.equals(result.replace(/\t|\r/g, "").split("\n"), this.grabbedPlugins)) {
|
||||||
if (response && !BDFDB.equals(result.split("\n"), this.grabbedPlugins)) {
|
|
||||||
this.loading = {is:false, timeout:null, amount:0};
|
this.loading = {is:false, timeout:null, amount:0};
|
||||||
this.loadPlugins();
|
this.loadPlugins();
|
||||||
}
|
}
|
||||||
|
@ -844,8 +843,7 @@ class PluginRepo {
|
||||||
}
|
}
|
||||||
|
|
||||||
downloadPlugin (data) {
|
downloadPlugin (data) {
|
||||||
let request = require("request");
|
require("request")(data.url, (error, response, body) => {
|
||||||
request(data.url, (error, response, body) => {
|
|
||||||
if (error) {
|
if (error) {
|
||||||
BDFDB.showToast(`Unable to download Plugin "${plugin.getName}".`, {type:"danger"});
|
BDFDB.showToast(`Unable to download Plugin "${plugin.getName}".`, {type:"danger"});
|
||||||
}
|
}
|
||||||
|
|
|
@ -837,9 +837,8 @@ class ThemeRepo {
|
||||||
}
|
}
|
||||||
|
|
||||||
checkForNewThemes () {
|
checkForNewThemes () {
|
||||||
let request = require("request");
|
require("request")("https://mwittrien.github.io/BetterDiscordAddons/Plugins/ThemeRepo/res/ThemeList.txt", (error, response, result) => {
|
||||||
request("https://mwittrien.github.io/BetterDiscordAddons/Plugins/ThemeRepo/res/ThemeList.txt", (error, response, result) => {
|
if (response && !BDFDB.equals(result.replace(/\t|\r/g, "").split("\n"), this.grabbedThemes)) {
|
||||||
if (response && !BDFDB.equals(result.split("\n"), this.grabbedThemes)) {
|
|
||||||
this.loading = {is:false, timeout:null, amount:0};
|
this.loading = {is:false, timeout:null, amount:0};
|
||||||
this.loadThemes();
|
this.loadThemes();
|
||||||
}
|
}
|
||||||
|
@ -847,8 +846,7 @@ class ThemeRepo {
|
||||||
}
|
}
|
||||||
|
|
||||||
downloadTheme (data) {
|
downloadTheme (data) {
|
||||||
let request = require("request");
|
require("request")(data.url, (error, response, body) => {
|
||||||
request(data.url, (error, response, body) => {
|
|
||||||
if (error) {
|
if (error) {
|
||||||
BDFDB.showToast(`Unable to download Theme "${data.name}".`, {type:"danger"});
|
BDFDB.showToast(`Unable to download Theme "${data.name}".`, {type:"danger"});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue