Merge remote-tracking branch 'upstream/dev' into immediate-finds
This commit is contained in:
commit
4fc4f1cb75
|
@ -1,6 +1,6 @@
|
||||||
# ShowHiddenThings
|
# ShowHiddenThings
|
||||||
|
|
||||||
Displays various moderator-only elements regardless of permissions.
|
Displays various hidden & moderator-only things regardless of permissions.
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
|
@ -15,3 +15,5 @@ Displays various moderator-only elements regardless of permissions.
|
||||||
![](https://github.com/Vendicated/Vencord/assets/47677887/3dac95dd-841c-4c15-ad87-2db7bd1e4dab)
|
![](https://github.com/Vendicated/Vencord/assets/47677887/3dac95dd-841c-4c15-ad87-2db7bd1e4dab)
|
||||||
|
|
||||||
- Disable filters in Server Discovery search that hide servers that don't meet discovery criteria
|
- Disable filters in Server Discovery search that hide servers that don't meet discovery criteria
|
||||||
|
|
||||||
|
- Disable filters in Server Discovery search that hide NSFW & disallowed servers
|
||||||
|
|
|
@ -41,13 +41,18 @@ const settings = definePluginSettings({
|
||||||
description: "Disable filters in Server Discovery search that hide servers that don't meet discovery criteria.",
|
description: "Disable filters in Server Discovery search that hide servers that don't meet discovery criteria.",
|
||||||
default: true,
|
default: true,
|
||||||
},
|
},
|
||||||
|
disableDisallowedDiscoveryFilters: {
|
||||||
|
type: OptionType.BOOLEAN,
|
||||||
|
description: "Disable filters in Server Discovery search that hide NSFW & disallowed servers.",
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
migratePluginSettings("ShowHiddenThings", "ShowTimeouts");
|
migratePluginSettings("ShowHiddenThings", "ShowTimeouts");
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
name: "ShowHiddenThings",
|
name: "ShowHiddenThings",
|
||||||
tags: ["ShowTimeouts", "ShowInvitesPaused", "ShowModView", "DisableDiscoveryFilters"],
|
tags: ["ShowTimeouts", "ShowInvitesPaused", "ShowModView", "DisableDiscoveryFilters"],
|
||||||
description: "Displays various moderator-only elements regardless of permissions.",
|
description: "Displays various hidden & moderator-only things regardless of permissions.",
|
||||||
authors: [Devs.Dolfies],
|
authors: [Devs.Dolfies],
|
||||||
patches: [
|
patches: [
|
||||||
{
|
{
|
||||||
|
@ -81,6 +86,23 @@ export default definePlugin({
|
||||||
match: /filters:\i\.join\(" AND "\),facets:\[/,
|
match: /filters:\i\.join\(" AND "\),facets:\[/,
|
||||||
replace: "facets:["
|
replace: "facets:["
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
find: "DiscoveryBannedSearchWords.includes",
|
||||||
|
predicate: () => settings.store.disableDisallowedDiscoveryFilters,
|
||||||
|
replacement: {
|
||||||
|
match: /(?<=function\(\){)(?=.{0,130}DiscoveryBannedSearchWords\.includes)/,
|
||||||
|
replace: "return false;"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
find: "Endpoints.GUILD_DISCOVERY_VALID_TERM",
|
||||||
|
predicate: () => settings.store.disableDisallowedDiscoveryFilters,
|
||||||
|
all: true,
|
||||||
|
replacement: {
|
||||||
|
match: /\i\.HTTP\.get\(\{url:\i\.Endpoints\.GUILD_DISCOVERY_VALID_TERM,query:\{term:\i\},oldFormErrors:!0\}\);/g,
|
||||||
|
replace: "Promise.resolve({ body: { valid: true } });"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
settings,
|
settings,
|
||||||
|
|
Loading…
Reference in a new issue