fix folder opening

This commit is contained in:
Zack Rauen 2020-07-16 22:10:50 -04:00
parent 73cae52f9b
commit 8d25e33a2e
5 changed files with 17 additions and 7 deletions

File diff suppressed because one or more lines are too long

2
js/main.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -144,7 +144,7 @@ export default new class ContentManager {
content = "";
}
else {
// Utils.warn("Module Not Exported", `${meta.name}, please start setting module.exports`);
Utils.warn("Module Not Exported", `${meta.name}, please start setting module.exports`);
content += `\nmodule.exports = ${JSON.stringify(meta)};\nmodule.exports.type = ${meta.exports || meta.name};`;
}
}

View File

@ -33,7 +33,9 @@ export default class CardList extends BDV2.reactComponent {
}
openFolder() {
require("electron").shell.openItem(this.isPlugins ? ContentManager.pluginsFolder : ContentManager.themesFolder);
const shell = require("electron").shell;
const open = shell.openPath || shell.openItem;
open(this.isPlugins ? ContentManager.pluginsFolder : ContentManager.themesFolder);
}
edit(name) {

View File

@ -26,4 +26,12 @@ export default class V2C_Scroller extends BDV2.reactComponent {
)
);
}
}
}
const originalRender = V2C_Scroller.prototype.render;
Object.defineProperty(V2C_Scroller.prototype, "render", {
enumerable: false,
configurable: false,
set: function() {console.warn("Addon policy for plugins #5 https://github.com/rauenzi/BetterDiscordApp/wiki/Addon-Policies#plugins");},
get: () => originalRender
});