diff --git a/injector/src/index.js b/injector/src/index.js index b38b5ebd..025821ae 100644 --- a/injector/src/index.js +++ b/injector/src/index.js @@ -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");