fix some more patches
This commit is contained in:
parent
caab1fd59a
commit
c1022cc392
2 changed files with 6 additions and 26 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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: () => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue