mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-01-09 17:36:23 +00:00
Merge branch 'dev' into Warning
This commit is contained in:
commit
15eeb3921f
2 changed files with 9 additions and 43 deletions
|
@ -71,13 +71,16 @@ export async function installExt(id: string) {
|
||||||
// React Devtools v4.25
|
// React Devtools v4.25
|
||||||
// v4.27 is broken in Electron, see https://github.com/facebook/react/issues/25843
|
// v4.27 is broken in Electron, see https://github.com/facebook/react/issues/25843
|
||||||
// Unfortunately, Google does not serve old versions, so this is the only way
|
// Unfortunately, Google does not serve old versions, so this is the only way
|
||||||
|
// This zip file is pinned to long commit hash so it cannot be changed remotely
|
||||||
? "https://raw.githubusercontent.com/Vendicated/random-files/f6f550e4c58ac5f2012095a130406c2ab25b984d/fmkadmapgofadopljbjfkapdkoienihi.zip"
|
? "https://raw.githubusercontent.com/Vendicated/random-files/f6f550e4c58ac5f2012095a130406c2ab25b984d/fmkadmapgofadopljbjfkapdkoienihi.zip"
|
||||||
: `https://clients2.google.com/service/update2/crx?response=redirect&acceptformat=crx2,crx3&x=id%3D${id}%26uc&prodversion=32`;
|
: `https://clients2.google.com/service/update2/crx?response=redirect&acceptformat=crx2,crx3&x=id%3D${id}%26uc&prodversion=${process.versions.chrome}`;
|
||||||
|
|
||||||
const buf = await get(url, {
|
const buf = await get(url, {
|
||||||
headers: {
|
headers: {
|
||||||
"User-Agent": "Vencord (https://github.com/Vendicated/Vencord)"
|
"User-Agent": `Electron ${process.versions.electron} ~ Vencord (https://github.com/Vendicated/Vencord)`
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
await extract(crxToZip(buf), extDir).catch(console.error);
|
await extract(crxToZip(buf), extDir).catch(console.error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,9 +30,7 @@ const opt = (description: string) => ({
|
||||||
const settings = definePluginSettings({
|
const settings = definePluginSettings({
|
||||||
showTimeouts: opt("Show member timeout icons in chat."),
|
showTimeouts: opt("Show member timeout icons in chat."),
|
||||||
showInvitesPaused: opt("Show the invites paused tooltip in the server list."),
|
showInvitesPaused: opt("Show the invites paused tooltip in the server list."),
|
||||||
showModView: opt("Show the member mod view context menu item in all servers."),
|
showModView: opt("Show the member mod view context menu item in all servers.")
|
||||||
disableDiscoveryFilters: opt("Disable filters in Server Discovery search that hide servers that don't meet discovery criteria."),
|
|
||||||
disableDisallowedDiscoveryFilters: opt("Disable filters in Server Discovery search that hide NSFW & disallowed servers."),
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
|
@ -40,6 +38,8 @@ export default definePlugin({
|
||||||
tags: ["ShowTimeouts", "ShowInvitesPaused", "ShowModView", "DisableDiscoveryFilters"],
|
tags: ["ShowTimeouts", "ShowInvitesPaused", "ShowModView", "DisableDiscoveryFilters"],
|
||||||
description: "Displays various hidden & moderator-only things regardless of permissions.",
|
description: "Displays various hidden & moderator-only things regardless of permissions.",
|
||||||
authors: [Devs.Dolfies],
|
authors: [Devs.Dolfies],
|
||||||
|
settings,
|
||||||
|
|
||||||
patches: [
|
patches: [
|
||||||
{
|
{
|
||||||
find: "showCommunicationDisabledStyles",
|
find: "showCommunicationDisabledStyles",
|
||||||
|
@ -82,43 +82,6 @@ export default definePlugin({
|
||||||
match: /\i(?=\?null)/,
|
match: /\i(?=\?null)/,
|
||||||
replace: "false"
|
replace: "false"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
{
|
|
||||||
find: "prod_discoverable_guilds",
|
|
||||||
predicate: () => settings.store.disableDiscoveryFilters,
|
|
||||||
replacement: {
|
|
||||||
match: /\{"auto_removed:.*?\}/,
|
|
||||||
replace: "{}"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// remove the 200 server minimum
|
|
||||||
{
|
|
||||||
find: '">200"',
|
|
||||||
predicate: () => settings.store.disableDiscoveryFilters,
|
|
||||||
replacement: {
|
|
||||||
match: '">200"',
|
|
||||||
replace: '">0"'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// empty word filter
|
|
||||||
{
|
|
||||||
find: '"pepe","nude"',
|
|
||||||
predicate: () => settings.store.disableDisallowedDiscoveryFilters,
|
|
||||||
replacement: {
|
|
||||||
match: /(?<=[?=])\["pepe",.+?\]/,
|
|
||||||
replace: "[]",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
// patch request that queries if term is allowed
|
|
||||||
{
|
|
||||||
find: ".GUILD_DISCOVERY_VALID_TERM,query:",
|
|
||||||
predicate: () => settings.store.disableDisallowedDiscoveryFilters,
|
|
||||||
all: true,
|
|
||||||
replacement: {
|
|
||||||
match: /\i\.\i\.get\(\{url:\i\.\i\.GUILD_DISCOVERY_VALID_TERM,query:\{term:\i\},oldFormErrors:!0,rejectWithError:!1\}\)/g,
|
|
||||||
replace: "Promise.resolve({ body: { valid: true } })"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
settings,
|
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue