Merge branch 'Vendicated:main' into TablistApi

This commit is contained in:
programminglaboratorys 2024-05-28 05:40:29 +03:00 committed by GitHub
commit 3dfd47af53
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 31 additions and 2 deletions

View file

@ -1,7 +1,7 @@
{
"name": "vencord",
"private": "true",
"version": "1.8.5",
"version": "1.8.6",
"description": "The cutest Discord client mod",
"homepage": "https://github.com/Vendicated/Vencord#readme",
"bugs": {

View file

@ -131,7 +131,16 @@ if (!IS_VANILLA) {
process.env.DATA_DIR = join(app.getPath("userData"), "..", "Vencord");
// work around discord unloading when in background
// 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);
};
// Work around discord unloading when in background
app.commandLine.appendSwitch("disable-renderer-backgrounding");
} else {
console.log("[Vencord] Running in vanilla mode. Not loading Vencord");

View file

@ -56,6 +56,26 @@ export default definePlugin({
}
]
},
// Discord Stable
// FIXME: remove once change merged to stable
{
find: "Messages.ACTIVITY_SETTINGS",
replacement: {
get match() {
switch (Settings.plugins.Settings.settingsLocation) {
case "top": return /\{section:(\i\.\i)\.HEADER,\s*label:(\i)\.\i\.Messages\.USER_SETTINGS/;
case "aboveNitro": return /\{section:(\i\.\i)\.HEADER,\s*label:(\i)\.\i\.Messages\.BILLING_SETTINGS/;
case "belowNitro": return /\{section:(\i\.\i)\.HEADER,\s*label:(\i)\.\i\.Messages\.APP_SETTINGS/;
case "belowActivity": return /(?<=\{section:(\i\.\i)\.DIVIDER},)\{section:"changelog"/;
case "bottom": return /\{section:(\i\.\i)\.CUSTOM,\s*element:.+?}/;
case "aboveActivity":
default:
return /\{section:(\i\.\i)\.HEADER,\s*label:(\i)\.\i\.Messages\.ACTIVITY_SETTINGS/;
}
},
replace: "...$self.makeSettingsCategories($1),$&"
}
},
{
find: "Messages.ACTIVITY_SETTINGS",
replacement: {