diff --git a/src/plugins/decor/index.tsx b/src/plugins/decor/index.tsx index 6bb5eb097..03f468b23 100644 --- a/src/plugins/decor/index.tsx +++ b/src/plugins/decor/index.tsx @@ -111,16 +111,10 @@ export default definePlugin({ // Patch avatar decoration preview to display Decor avatar decorations as if they are purchased { find: "#{intl::PREMIUM_UPSELL_PROFILE_AVATAR_DECO_INLINE_UPSELL_DESCRIPTION}", - replacement: [ - { - match: /(#{intl::PREMIUM_UPSELL_PROFILE_AVATAR_DECO_INLINE_UPSELL_DESCRIPTION}.+?return null!=(\i)&&\()(null==\i)/, - replace: (_, rest, avatarDecoration, hasPurchase) => `${rest}(${avatarDecoration}.skuId!==$self.SKU_ID&&${avatarDecoration}.skuId!==$self.RAW_SKU_ID&&${hasPurchase})` - }, - { - match: /(?<==)\i=>{let{user:\i,guildId:\i,avatarDecoration:/, - replace: "$self.AvatarDecorationModalPreview=$&" - } - ] + replacement: { + match: /(?<==)\i=>{let{user:\i,guildId:\i,avatarDecoration:/, + replace: "$self.AvatarDecorationModalPreview=$&" + } } ], settings, diff --git a/src/plugins/experiments/index.tsx b/src/plugins/experiments/index.tsx index 9105d2d86..ed6e67cee 100644 --- a/src/plugins/experiments/index.tsx +++ b/src/plugins/experiments/index.tsx @@ -15,13 +15,11 @@ import { Devs, IS_MAC } from "@utils/constants"; import { Margins } from "@utils/margins"; import definePlugin, { OptionType } from "@utils/types"; import { findByPropsLazy } from "@webpack"; -import { React } from "@webpack/common"; +import { ExperimentStore, React } from "@webpack/common"; import hideBugReport from "./hideBugReport.css?managed"; const KbdStyles = findByPropsLazy("key", "combo"); -let BugReporterExperiment: any; - const modKey = IS_MAC ? "cmd" : "ctrl"; const altKey = IS_MAC ? "opt" : "alt"; @@ -147,19 +145,7 @@ export default definePlugin({ } ] }, - { - find: "2026-01-bug-reporter", - replacement: { - match: /(?<==)(?=\(0,\i\(.+?\)\.\i\)\({name:"2026-01-bug-reporter")/, - replace: "$self.BugReporterExperiment=" - } - } ], - - set BugReporterExperiment(value: any) { - BugReporterExperiment = value; - }, - matchExperiment(url: string, label: string): boolean { const items = url.split("/"); const labelCleaned = label.replace(/[^a-zA-Z0-9]+/g, "").toLowerCase(); @@ -167,7 +153,7 @@ export default definePlugin({ return !!labelCleaned && urlEndCleaned !== undefined && labelCleaned === urlEndCleaned; }, - start: () => !BugReporterExperiment.getConfig().hasBugReporterAccess && enableStyle(hideBugReport), + start: () => ExperimentStore.getUserExperimentBucket("2026-01-bug-reporter") > 0 && enableStyle(hideBugReport), stop: () => disableStyle(hideBugReport), settingsAboutComponent: () => {