Fix devtools context menus on canary

main
Nuckyz 9 months ago
parent 8b3189f1ed
commit 7592b5c172
No known key found for this signature in database
GPG Key ID: 440BF8296E1C4AD9

@ -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");
}

Loading…
Cancel
Save