BrowserWindow: Disable sandbox to fix electron>=21
This commit is contained in:
parent
9951e0bcc5
commit
d4eadf9348
2 changed files with 2 additions and 1 deletions
|
@ -4,7 +4,7 @@ My own Discord Desktop mod :)
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- Proper context isolation -> Works in newer Electron versions
|
- Proper context isolation -> Works in newer Electron versions (Confirmed working on versions 13-21)
|
||||||
- Inline patches: Patch Discord's code with regex replacements! See [the experiments plugin](src/plugins/experiments.ts) for an example. While being more complex, this is more powerful than monkey patching since you can patch only small parts of functions instead of fully replacing them, access non exported/local variables and even replace constants (like in the aforementioned experiments patch!)
|
- Inline patches: Patch Discord's code with regex replacements! See [the experiments plugin](src/plugins/experiments.ts) for an example. While being more complex, this is more powerful than monkey patching since you can patch only small parts of functions instead of fully replacing them, access non exported/local variables and even replace constants (like in the aforementioned experiments patch!)
|
||||||
- Custom Css: Manually edit `%appdata%/Vencord/settings/quickCss.css` / `~/.config/Vencord/settings/quickCss.css` with your favourite editor and the client will automatically apply your changes
|
- Custom Css: Manually edit `%appdata%/Vencord/settings/quickCss.css` / `~/.config/Vencord/settings/quickCss.css` with your favourite editor and the client will automatically apply your changes
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ class BrowserWindow extends electron.BrowserWindow {
|
||||||
if (options?.webPreferences?.preload && options.title) {
|
if (options?.webPreferences?.preload && options.title) {
|
||||||
const original = options.webPreferences.preload;
|
const original = options.webPreferences.preload;
|
||||||
options.webPreferences.preload = join(__dirname, "preload.js");
|
options.webPreferences.preload = join(__dirname, "preload.js");
|
||||||
|
options.webPreferences.sandbox = false;
|
||||||
|
|
||||||
process.env.DISCORD_PRELOAD = original;
|
process.env.DISCORD_PRELOAD = original;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue