This commit is contained in:
Mirco Wittrien 2020-09-20 07:08:51 +02:00
parent e83cc3ec9f
commit 2c3e8bc8e3
2 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@ if (window.BDFDB && window.BDFDB.myPlugins && Object.keys(window.BDFDB.myPlugins
setTimeout(_ => {
let url = typeof plugins[name].getRawUrl == "function" && typeof plugins[name].getRawUrl() == "string" ? plugins[name].getRawUrl() : `https://mwittrien.github.io/BetterDiscordAddons/Plugins/${name}/${name}.plugin.js`;
request(url, (error, response, body) => {
if (!error && body) fs.writeFile(path.join(BdApi.Plugins.folder, name + ".plugin.js"), body, _ => {
if (!error && body && body.indexOf(`//META{"name":"`) > -1) fs.writeFile(path.join(BdApi.Plugins.folder, name + ".plugin.js"), body, _ => {
if (last) finish();
});
else if (last) finish();

View File

@ -16,7 +16,7 @@ if (window.BDFDB && window.BDFDB.myPlugins && Object.keys(window.BDFDB.myPlugins
setTimeout(_ => {
let url = typeof plugins[name].getRawUrl == "function" && typeof plugins[name].getRawUrl() == "string" ? plugins[name].getRawUrl() : `https://mwittrien.github.io/BetterDiscordAddons/Plugins/${name}/${name}.plugin.js`;
request(url, (error, response, body) => {
if (!error && body) fs.writeFile(path.join(BdApi.Plugins.folder, name + ".plugin.js"), body, _ => {
if (!error && body && body.indexOf(`//META{"name":"`) > -1) fs.writeFile(path.join(BdApi.Plugins.folder, name + ".plugin.js"), body, _ => {
if (last) finish();
});
else if (last) finish();