From 61fac0a8f1adc35b3c54cd58bde17c7dd55abcc0 Mon Sep 17 00:00:00 2001 From: redstonekasi Date: Wed, 25 Oct 2023 18:46:32 +0200 Subject: [PATCH] fix: NoPendingCount (#1871) Co-authored-by: V --- src/plugins/noPendingCount/index.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/noPendingCount/index.ts b/src/plugins/noPendingCount/index.ts index 21bd196a..9dce56ba 100644 --- a/src/plugins/noPendingCount/index.ts +++ b/src/plugins/noPendingCount/index.ts @@ -84,8 +84,10 @@ export default definePlugin({ find: "showProgressBadge:", predicate: () => settings.store.hidePremiumOffersCount, replacement: { - match: /=\i\.unviewedTrialCount\+\i\.unviewedDiscountCount/, - replace: "=0" + // The two groups inside the first group grab the minified names of the variables, + // they are then referenced later to find unviewedTrialCount + unviewedDiscountCount. + match: /(?<=\{unviewedTrialCount:(\i),unviewedDiscountCount:(\i)\}.{0,200}\i=)\1\+\2/, + replace: "0" } } ],