Fix devtools context menus on canary
This commit is contained in:
parent
8b3189f1ed
commit
7592b5c172
1 changed files with 9 additions and 0 deletions
|
@ -129,6 +129,15 @@ if (!IS_VANILLA) {
|
||||||
});
|
});
|
||||||
|
|
||||||
process.env.DATA_DIR = join(app.getPath("userData"), "..", "Vencord");
|
process.env.DATA_DIR = join(app.getPath("userData"), "..", "Vencord");
|
||||||
|
|
||||||
|
// Monkey patch commandLine to disable WidgetLayering: Fix DevTools context menus https://github.com/electron/electron/issues/38790
|
||||||
|
const originalAppend = app.commandLine.appendSwitch;
|
||||||
|
app.commandLine.appendSwitch = function (...args) {
|
||||||
|
if (args[0] === "disable-features" && !args[1]?.includes("WidgetLayering")) {
|
||||||
|
args[1] += ",WidgetLayering";
|
||||||
|
}
|
||||||
|
return originalAppend.apply(this, args);
|
||||||
|
};
|
||||||
} else {
|
} else {
|
||||||
console.log("[Vencord] Running in vanilla mode. Not loading Vencord");
|
console.log("[Vencord] Running in vanilla mode. Not loading Vencord");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue