Enable DevTools on Stable (#1179)

This commit is contained in:
2022-01-26 11:51:17 -05:00
parent 434d5d96a6
commit 35cd237552
+13
View File
@@ -22,6 +22,19 @@ if (!process.argv.includes("--vanilla")) {
else CSP.remove();
}
// Enable DevTools on Stable.
let fakeAppSettings;
Object.defineProperty(global, "appSettings", {
get() {
return fakeAppSettings;
},
set(value) {
if (!value.hasOwnProperty("settings")) value.settings = {};
value.settings.DANGEROUS_ENABLE_DEVTOOLS_ONLY_ENABLE_IF_YOU_KNOW_WHAT_YOURE_DOING = true;
fakeAppSettings = value;
},
});
// Use Discord's info to run the app
if (process.platform == "win32" || process.platform == "darwin") {
const basePath = path.join(app.getAppPath(), "..", "app.asar");