mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-01-10 18:06:22 +00:00
Merge branch 'Vendicated:main' into TablistApi
This commit is contained in:
commit
3dfd47af53
3 changed files with 31 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "vencord",
|
"name": "vencord",
|
||||||
"private": "true",
|
"private": "true",
|
||||||
"version": "1.8.5",
|
"version": "1.8.6",
|
||||||
"description": "The cutest Discord client mod",
|
"description": "The cutest Discord client mod",
|
||||||
"homepage": "https://github.com/Vendicated/Vencord#readme",
|
"homepage": "https://github.com/Vendicated/Vencord#readme",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
|
|
|
@ -131,7 +131,16 @@ if (!IS_VANILLA) {
|
||||||
|
|
||||||
process.env.DATA_DIR = join(app.getPath("userData"), "..", "Vencord");
|
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");
|
app.commandLine.appendSwitch("disable-renderer-backgrounding");
|
||||||
} else {
|
} else {
|
||||||
console.log("[Vencord] Running in vanilla mode. Not loading Vencord");
|
console.log("[Vencord] Running in vanilla mode. Not loading Vencord");
|
||||||
|
|
|
@ -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",
|
find: "Messages.ACTIVITY_SETTINGS",
|
||||||
replacement: {
|
replacement: {
|
||||||
|
|
Loading…
Reference in a new issue