Skip to content

Commit

Permalink
ShowHiddenThings: more effectively explode Algolia filters (#2484)
Browse files Browse the repository at this point in the history
Co-authored-by: vee <vendicated@riseup.net>
  • Loading branch information
dolfies and Vendicated committed May 21, 2024
1 parent 9c092b9 commit 08d7de0
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/plugins/showHiddenThings/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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\""
}
},
{
Expand Down

0 comments on commit 08d7de0

Please sign in to comment.