aboutsummaryrefslogtreecommitdiffstats
path: root/0005-Enable-CSP-bypass-on-stock-discord-desktop-client.patch
blob: 6de9bd6db45e46fe7ba535b2e6ae3fe9012a6b23 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From 5b5f38a2f78bdcbce52ec03efd5b2baccc5eeb7c Mon Sep 17 00:00:00 2001
From: 1024x2 <2pow11@gmail.com>
Date: Wed, 27 Dec 2023 15:05:44 +0000
Subject: [PATCH 5/6] Enable CSP bypass on stock discord desktop client

---
 src/main/index.ts | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/main/index.ts b/src/main/index.ts
index 5519d47a..64e71c15 100644
--- a/src/main/index.ts
+++ b/src/main/index.ts
@@ -24,10 +24,11 @@ import { RendererSettings } from "./settings";
 import { IS_VANILLA, THEMES_DIR } from "./utils/constants";
 import { installExt } from "./utils/extensions";
 
-if (IS_VESKTOP || !IS_VANILLA) {
+{
     app.whenReady().then(() => {
         // Source Maps! Maybe there's a better way but since the renderer is executed
         // from a string I don't think any other form of sourcemaps would work
+        if (IS_VESKTOP || !IS_VANILLA)
         protocol.registerFileProtocol("vencord", ({ url: unsafeUrl }, cb) => {
             let url = unsafeUrl.slice("vencord://".length);
             if (url.endsWith("/")) url = url.slice(0, -1);
-- 
2.45.2