diff --git a/src/plugins/accountPanelServerProfile/index.tsx b/src/plugins/accountPanelServerProfile/index.tsx index b6218bf5..e2dc220b 100644 --- a/src/plugins/accountPanelServerProfile/index.tsx +++ b/src/plugins/accountPanelServerProfile/index.tsx @@ -16,7 +16,7 @@ import { User } from "discord-types/general"; interface UserProfileProps { popoutProps: Record; currentUser: User; - OriginalPopout: () => React.ReactNode; + originalRenderPopout: () => React.ReactNode; } const UserProfile = findComponentByCodeLazy("UserProfilePopoutWrapper: user cannot be undefined"); @@ -78,7 +78,7 @@ export default definePlugin({ }, { match: /(\.AVATAR,children:.+?renderPopout:(\i)=>){(.+?)}(?=,position)(?<=currentUser:(\i).+?)/, - replace: (_, rest, popoutProps, originalPopout, currentUser) => `${rest}$self.UserProfile({popoutProps:${popoutProps},currentUser:${currentUser},OriginalPopout:()=>{${originalPopout}}})` + replace: (_, rest, popoutProps, originalPopout, currentUser) => `${rest}$self.UserProfile({popoutProps:${popoutProps},currentUser:${currentUser},originalRenderPopout:()=>{${originalPopout}}})` }, { match: /\.AVATAR,children:.+?(?=renderPopout:)/, @@ -112,17 +112,17 @@ export default definePlugin({ openAlternatePopout = false; }, - UserProfile: ErrorBoundary.wrap(({ popoutProps, currentUser, OriginalPopout }: UserProfileProps) => { + UserProfile: ErrorBoundary.wrap(({ popoutProps, currentUser, originalRenderPopout }: UserProfileProps) => { if ( (settings.store.prioritizeServerProfile && openAlternatePopout) || (!settings.store.prioritizeServerProfile && !openAlternatePopout) ) { - return ; + return originalRenderPopout(); } const currentChannel = getCurrentChannel(); if (currentChannel?.getGuildId() == null) { - return ; + return originalRenderPopout(); } return ( diff --git a/src/plugins/betterUploadButton/index.ts b/src/plugins/betterUploadButton/index.ts index 2406b71e..c08d4328 100644 --- a/src/plugins/betterUploadButton/index.ts +++ b/src/plugins/betterUploadButton/index.ts @@ -27,7 +27,7 @@ export default definePlugin({ { find: '"ChannelAttachButton"', replacement: { - match: /\.attachButtonInner,"aria-label":.{0,50},onDoubleClick:(.+?:void 0),\.\.\.(\i),/, + match: /\.attachButtonInner,"aria-label":.{0,50},onDoubleClick:(.+?:void 0),.{0,30}?\.\.\.(\i),/, replace: "$&onClick:$1,onContextMenu:$2.onClick,", }, }, diff --git a/src/plugins/fixImagesQuality/index.ts b/src/plugins/fixImagesQuality/index.ts index 8f84573c..b62d3c7b 100644 --- a/src/plugins/fixImagesQuality/index.ts +++ b/src/plugins/fixImagesQuality/index.ts @@ -13,7 +13,7 @@ export default definePlugin({ authors: [Devs.Nuckyz], patches: [ { - find: "getFormatQuality(){", + find: ".handleImageLoad)", replacement: { match: /(?<=null;return )\i\.\i&&\(\i\|\|!\i\.isAnimated.+?:(?=\i&&\(\i="png"\))/, replace: "" diff --git a/src/plugins/fullUserInChatbox/index.tsx b/src/plugins/fullUserInChatbox/index.tsx index 4bcc95b6..5a0c41c0 100644 --- a/src/plugins/fullUserInChatbox/index.tsx +++ b/src/plugins/fullUserInChatbox/index.tsx @@ -16,7 +16,7 @@ interface UserMentionComponentProps { id: string; channelId: string; guildId: string; - OriginalComponent: () => ReactNode; + originalComponent: () => ReactNode; } export default definePlugin({ @@ -29,7 +29,7 @@ export default definePlugin({ find: ':"text":', replacement: { match: /(hidePersonalInformation\).+?)(if\(null!=\i\){.+?return \i)(?=})/, - replace: "$1return $self.UserMentionComponent({...arguments[0],OriginalComponent:()=>{$2}});" + replace: "$1return $self.UserMentionComponent({...arguments[0],originalComponent:()=>{$2}});" } } ], @@ -42,6 +42,6 @@ export default definePlugin({ channelId={props.channelId} /> ), { - fallback: ({ wrappedProps: { OriginalComponent } }) => + fallback: ({ wrappedProps: { originalComponent } }) => originalComponent() }) });