aboutsummaryrefslogtreecommitdiff
path: root/src/ipcMain/index.ts
diff options
context:
space:
mode:
authorVendicated <vendicated@riseup.net>2022-10-22 06:31:47 +0200
committerVendicated <vendicated@riseup.net>2022-10-22 06:31:47 +0200
commitc116d00d037b9831b2d5cac4df15c10b0c6c4085 (patch)
tree26cd8c7c3c5feed0a3daddef69a28fc3a83f747d /src/ipcMain/index.ts
parent44f6f71c3efd2e4e0f9dbd97ab4680ec76536052 (diff)
downloadVencord-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/ipcMain/index.ts')
-rw-r--r--src/ipcMain/index.ts16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/ipcMain/index.ts b/src/ipcMain/index.ts
index dc05079..d815142 100644
--- a/src/ipcMain/index.ts
+++ b/src/ipcMain/index.ts
@@ -26,21 +26,9 @@ import monacoHtml from "@fileContent/../components/monacoWin.html;base64";
import "./updater";
import { Queue } from "../utils/Queue";
+import { QUICKCSS_PATH, ALLOWED_PROTOCOLS, SETTINGS_DIR, SETTINGS_FILE } from "./constants";
+
-const DATA_DIR = process.env.VENCORD_USER_DATA_DIR ?? (
- process.env.DISCORD_USER_DATA_DIR
- ? join(process.env.DISCORD_USER_DATA_DIR, "..", "VencordData")
- : join(app.getPath("userData"), "..", "Vencord")
-);
-const SETTINGS_DIR = join(DATA_DIR, "settings");
-const QUICKCSS_PATH = join(SETTINGS_DIR, "quickCss.css");
-const SETTINGS_FILE = join(SETTINGS_DIR, "settings.json");
-const ALLOWED_PROTOCOLS = [
- "https:",
- "http:",
- "steam:",
- "spotify:"
-];
mkdirSync(SETTINGS_DIR, { recursive: true });