diff --git a/src/plugins/callTimer/index.tsx b/src/plugins/callTimer/index.tsx index bb1cb5dd5..d1d792fea 100644 --- a/src/plugins/callTimer/index.tsx +++ b/src/plugins/callTimer/index.tsx @@ -79,14 +79,21 @@ export default definePlugin({ startTime: 0, interval: void 0 as NodeJS.Timeout | undefined, - patches: [{ - find: "renderConnectionStatus(){", - replacement: { - // in renderConnectionStatus() - match: /(renderConnectionStatus\(\).{0,1000}?lineClamp:1,children:)(\i)(?=,|}\))/, - replace: "$1[$2,$self.renderTimer({ channelId: this?.props?.channel?.id })]" - } - }], + patches: [ + { + find: "renderConnectionStatus(){", + replacement: [ + { + match: /(renderConnectionStatus\(\).{0,1000}?lineClamp:1,children:)(\i)(?=,|}\))/, + replace: "$1[$2,$self.renderTimer({ channelId: this?.props?.channel?.id })]" + }, + { + match: /("RTCConnectionMenu".{0,200}?lineClamp:1,children:)(\i)(?=,|}\))/, + replace: "$1[$2,$self.renderTimer({ channelId: this?.props?.channel?.id })]" + } + ] + }, + ], renderTimer: ErrorBoundary.wrap(({ channelId }: { channelId: string; }) => { const time = useTimer({ deps: [channelId] }); diff --git a/src/plugins/fullSearchContext/index.tsx b/src/plugins/fullSearchContext/index.tsx index 672552d9f..64bf1a2b8 100644 --- a/src/plugins/fullSearchContext/index.tsx +++ b/src/plugins/fullSearchContext/index.tsx @@ -85,7 +85,7 @@ export default definePlugin({ authors: [Devs.Ven, Devs.Aria], patches: [{ - find: "onClick:this.handleMessageClick,", + find: "Listbox navigator was given an unhandled action", replacement: { match: /this(?=\.handleContextMenu\(\i,\i\))/, replace: "$self" diff --git a/src/plugins/showConnections/index.tsx b/src/plugins/showConnections/index.tsx index a5ce1863a..868044efb 100644 --- a/src/plugins/showConnections/index.tsx +++ b/src/plugins/showConnections/index.tsx @@ -162,7 +162,7 @@ export default definePlugin({ patches: [ { // Same find as ReviewDB - find: "#{intl::USER_PROFILE_FRIEND_REQUEST_TOAST}", + find: '"UserProfilePopout");', replacement: { match: /userId:\i\.id,guild:\i\}\)(?=])/, replace: "$&,$self.profilePopoutComponent(arguments[0])" diff --git a/src/plugins/themeAttributes/index.ts b/src/plugins/themeAttributes/index.ts index d6e2089b9..e44235a18 100644 --- a/src/plugins/themeAttributes/index.ts +++ b/src/plugins/themeAttributes/index.ts @@ -23,7 +23,7 @@ export default definePlugin({ { find: ".tabBarRef", replacement: { - match: /style:this\.getStyle\(\),role:"tab"/, + match: /style:this\.getStyle\(\),role:\i/, replace: "$&,'data-tab-id':this?.props?.id" } }, diff --git a/src/plugins/typingTweaks/index.tsx b/src/plugins/typingTweaks/index.tsx index 495ba78b5..6d9f7478d 100644 --- a/src/plugins/typingTweaks/index.tsx +++ b/src/plugins/typingTweaks/index.tsx @@ -19,6 +19,7 @@ import { definePluginSettings } from "@api/Settings"; import ErrorBoundary from "@components/ErrorBoundary"; import { Devs } from "@utils/constants"; +import { classNameFactory } from "@utils/css"; import { openUserProfile } from "@utils/discord"; import { isNonNullish } from "@utils/guards"; import { Logger } from "@utils/Logger"; @@ -29,6 +30,7 @@ import { PropsWithChildren } from "react"; import managedStyle from "./style.css?managed"; +const cl = classNameFactory("vc-typing-tweaks-"); const settings = definePluginSettings({ showAvatars: { type: OptionType.BOOLEAN, @@ -69,7 +71,7 @@ interface TypingUserProps { const TypingUser = ErrorBoundary.wrap(function TypingUser({ user, guildId }: TypingUserProps) { return ( { openUserProfile(user.id); @@ -80,6 +82,7 @@ const TypingUser = ErrorBoundary.wrap(function TypingUser({ user, guildId }: Typ > {settings.store.showAvatars && ( )} @@ -108,7 +111,7 @@ export default definePlugin({ replacement: [ { // Style the indicator and add function call to modify the children before rendering - match: /(?<="aria-atomic":!0,children:)\i/, + match: /(?<="aria-hidden":!0,children:)\i/, replace: "$self.renderTypingUsers({ users: arguments[0]?.typingUserObjects, guildId: arguments[0]?.channel?.guild_id, children: $& })" }, { @@ -151,7 +154,6 @@ export default definePlugin({ } }, - buildSeveralUsers, renderTypingUsers: ErrorBoundary.wrap(({ guildId, users, children }: PropsWithChildren<{ guildId: string, users: User[]; }>) => { @@ -163,8 +165,7 @@ export default definePlugin({ let element = 0; return children.map(c => { - if (c.type !== "strong" && !(typeof c !== "string" && !React.isValidElement(c))) - return c; + if (c.type !== "strong" && !(typeof c !== "string" && !React.isValidElement(c))) return c; const user = users[element++]; return ; diff --git a/src/plugins/typingTweaks/style.css b/src/plugins/typingTweaks/style.css index 96fa3586b..d582a082c 100644 --- a/src/plugins/typingTweaks/style.css +++ b/src/plugins/typingTweaks/style.css @@ -1,4 +1,4 @@ -.vc-typing-user { +.vc-typing-tweaks-user { cursor: pointer; [class*="wrapper"] {