diff --git a/src/plugins/_api/messagePopover.ts b/src/plugins/_api/messagePopover.ts index a297fc878..a49658fb3 100644 --- a/src/plugins/_api/messagePopover.ts +++ b/src/plugins/_api/messagePopover.ts @@ -27,7 +27,7 @@ export default definePlugin({ { find: "#{intl::MESSAGE_UTILITIES_A11Y_LABEL}", replacement: { - match: /(?<=:null),(.{0,40}togglePopout:.+?}\)),(.+?)\]}\):null,(?<=\((\i\.\i),{label:.+?children:\[(\i&&!\i)\?\(0,\i\.jsxs?\)\(\i\.Fragment.+?message:(\i).+?)/, + match: /(?<=:null),(.{0,40}togglePopout:.+?}\)),(.+?)\]}\):null,(?<=\((\i\.\i),{label:.+?:null,(\i)\?\(0,\i\.jsxs?\)\(\i\.Fragment.+?message:(\i).+?)/, replace: (_, ReactButton, PotionButton, ButtonComponent, showReactButton, message) => "" + `]}):null,Vencord.Api.MessagePopover._buildPopoverElements(${ButtonComponent},${message}),${showReactButton}?${ReactButton}:null,${showReactButton}&&${PotionButton},` } diff --git a/src/plugins/experiments/index.tsx b/src/plugins/experiments/index.tsx index 3645503c8..3ff1b67ef 100644 --- a/src/plugins/experiments/index.tsx +++ b/src/plugins/experiments/index.tsx @@ -103,11 +103,19 @@ export default definePlugin({ }, // Fix some tricky experiments name causing a client crash { - match: /\i\.\i\)\(\)(?<=(\i)=.+?).+?if\(null==(\i)(?=\);)/, - replace: "$&||!Object.hasOwn($1,$2)" + match: /.getExperimentBucketName.+?if\(null==(\i)\|\|null==\i(?=\)return null;)/, + replace: "$&||({})[$1]!=null" } ] }, + // Fix another function which cases crashes with tricky experiment names and the experiment embed + { + find: "}getServerAssignment(", + replacement: { + match: /}getServerAssignment\((\i),\i,\i\){/, + replace: "$&if($1==null)return;" + } + } ], start: () => !BugReporterExperiment.getCurrentConfig().hasBugReporterAccess && enableStyle(hideBugReport), diff --git a/src/plugins/overrideForumDefaults/index.tsx b/src/plugins/overrideForumDefaults/index.tsx index be106ac8a..a377fff5d 100644 --- a/src/plugins/overrideForumDefaults/index.tsx +++ b/src/plugins/overrideForumDefaults/index.tsx @@ -36,11 +36,11 @@ export default definePlugin({ find: "getDefaultLayout(){", replacement: [ { - match: /getDefaultLayout\(\){/, + match: /}getDefaultLayout\(\){/, replace: "$&return $self.getLayout();" }, { - match: /getDefaultSortOrder\(\){/, + match: /}getDefaultSortOrder\(\){/, replace: "$&return $self.getSortOrder();" } ]