Fix devtools context menus on canary

This commit is contained in:
Nuckyz 2024-02-06 13:31:02 -03:00
parent 8b3189f1ed
commit 7592b5c172
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9

View file

@ -129,6 +129,15 @@ if (!IS_VANILLA) {
});
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 {
console.log("[Vencord] Running in vanilla mode. Not loading Vencord");
}