ShowHiddenThings: more effectively explode Algolia filters (#2484)

Co-authored-by: vee <vendicated@riseup.net>
This commit is contained in:
dolfies 2024-05-20 20:28:06 -04:00 committed by GitHub
parent 9c092b9c29
commit 08d7de06b2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -80,11 +80,19 @@ export default definePlugin({
}
},
{
find: "auto_removed:",
find: "prod_discoverable_guilds",
predicate: () => settings.store.disableDiscoveryFilters,
replacement: {
match: /filters:\i\.join\(" AND "\),facets:\[/,
replace: "facets:["
match: /\{"auto_removed:.*?\}/,
replace: "{}"
}
},
{
find: "MINIMUM_MEMBER_COUNT:",
predicate: () => settings.store.disableDiscoveryFilters,
replacement: {
match: /MINIMUM_MEMBER_COUNT:function\(\)\{return \i}/,
replace: "MINIMUM_MEMBER_COUNT:() => \">0\""
}
},
{