From 08d7de06b27243ec58a4ec6f0598f563461ae57a Mon Sep 17 00:00:00 2001 From: dolfies Date: Mon, 20 May 2024 20:28:06 -0400 Subject: [PATCH] ShowHiddenThings: more effectively explode Algolia filters (#2484) Co-authored-by: vee --- src/plugins/showHiddenThings/index.ts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/plugins/showHiddenThings/index.ts b/src/plugins/showHiddenThings/index.ts index 8de70aca9..db4fe5aa6 100644 --- a/src/plugins/showHiddenThings/index.ts +++ b/src/plugins/showHiddenThings/index.ts @@ -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\"" } }, {