diff options
author | Vendicated <vendicated@riseup.net> | 2022-10-22 06:31:47 +0200 |
---|---|---|
committer | Vendicated <vendicated@riseup.net> | 2022-10-22 06:31:47 +0200 |
commit | c116d00d037b9831b2d5cac4df15c10b0c6c4085 (patch) | |
tree | 26cd8c7c3c5feed0a3daddef69a28fc3a83f747d /src/patcher.ts | |
parent | 44f6f71c3efd2e4e0f9dbd97ab4680ec76536052 (diff) | |
download | Vencord-c116d00d037b9831b2d5cac4df15c10b0c6c4085.tar.gz Vencord-c116d00d037b9831b2d5cac4df15c10b0c6c4085.tar.bz2 Vencord-c116d00d037b9831b2d5cac4df15c10b0c6c4085.zip |
Implement Chrome extension loading myself because electron-devtools-installer is ultra bloated
Diffstat (limited to 'src/patcher.ts')
-rw-r--r-- | src/patcher.ts | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/patcher.ts b/src/patcher.ts index 06f03d8..eca35f0 100644 --- a/src/patcher.ts +++ b/src/patcher.ts @@ -19,6 +19,7 @@ import electron, { app, BrowserWindowConstructorOptions } from "electron"; import { join } from "path"; import { initIpc } from "./ipcMain"; +import { installExt } from "./ipcMain/extensions"; import { readSettings } from "./ipcMain/index"; console.log("[Vencord] Starting up..."); @@ -68,11 +69,7 @@ electron.app.whenReady().then(() => { try { const settings = JSON.parse(readSettings()); if (settings.enableReactDevtools) - import("electron-devtools-installer") - .then(({ default: inst, REACT_DEVELOPER_TOOLS }) => - // @ts-ignore: cursed fake esm turns it into exports.default.default - (inst.default ?? inst)(REACT_DEVELOPER_TOOLS) - ) + installExt("fmkadmapgofadopljbjfkapdkoienihi") .then(() => console.info("[Vencord] Installed React Developer Tools")) .catch(err => console.error("[Vencord] Failed to install React Developer Tools", err)); } catch { } |