From 4ace8fa7ef683780242bdbc0c508f171de30ee58 Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Wed, 25 Sep 2024 15:50:29 -0400 Subject: [PATCH 01/11] Fix Canary For Now TEMP --- src/plugins/_core/settings.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/plugins/_core/settings.tsx b/src/plugins/_core/settings.tsx index 6981f783..9dcc8a95 100644 --- a/src/plugins/_core/settings.tsx +++ b/src/plugins/_core/settings.tsx @@ -87,6 +87,13 @@ export default definePlugin({ replace: "return $1;" } ] + }, + { + find: "lastShownFriendsListGiftIntents).size", + replacement: { + match: /return .{0,50}.size>0/, + replace: "return;" + } } ], From 107d896b4072536dca261b2b77d88ee60525daee Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Wed, 25 Sep 2024 15:53:52 -0400 Subject: [PATCH 02/11] Already Reverted :husk: This reverts commit 4ace8fa7ef683780242bdbc0c508f171de30ee58. --- src/plugins/_core/settings.tsx | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/plugins/_core/settings.tsx b/src/plugins/_core/settings.tsx index 9dcc8a95..6981f783 100644 --- a/src/plugins/_core/settings.tsx +++ b/src/plugins/_core/settings.tsx @@ -87,13 +87,6 @@ export default definePlugin({ replace: "return $1;" } ] - }, - { - find: "lastShownFriendsListGiftIntents).size", - replacement: { - match: /return .{0,50}.size>0/, - replace: "return;" - } } ], From c4ba86345b03f605d9df7196a5e881ff850e8abd Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Wed, 25 Sep 2024 16:40:37 -0400 Subject: [PATCH 03/11] Fixes For Canary --- README.md | 4 +- src/equicordplugins/channelTabs/index.tsx | 2 +- src/equicordplugins/clientSideBlock/index.tsx | 2 +- src/equicordplugins/deadMembers/index.tsx | 62 ------------------- src/equicordplugins/messageColors/index.tsx | 4 +- .../messageLoggerEnhanced/index.tsx | 4 +- src/equicordplugins/modalFade/index.tsx | 4 +- .../replaceActivityTypes/index.tsx | 4 +- src/equicordplugins/serverSearch/index.tsx | 59 ------------------ src/equicordplugins/serverSearch/styles.css | 33 ---------- src/plugins/showMeYourName/index.tsx | 2 +- 11 files changed, 12 insertions(+), 168 deletions(-) delete mode 100644 src/equicordplugins/deadMembers/index.tsx delete mode 100644 src/equicordplugins/serverSearch/index.tsx delete mode 100644 src/equicordplugins/serverSearch/styles.css diff --git a/README.md b/README.md index 1f8bf257..e1abfc5d 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ You can join our [discord server](https://discord.gg/5Xh2W87egW) for commits, ch ### Extra included plugins
-126 additional plugins +124 additional plugins - AllCallTimers by MaxHerbold & D3SOX - AltKrispSwitch by newwares @@ -34,7 +34,6 @@ You can join our [discord server](https://discord.gg/5Xh2W87egW) for commits, ch - CuteAnimeBoys by ShadyGoat - CuteNekos by echo - CutePats by thororen -- DeadMembers by Kyuuhachi - Demonstration by Samwich - DisableCameras by Joona - DoNotLeak by Perny @@ -105,7 +104,6 @@ You can join our [discord server](https://discord.gg/5Xh2W87egW) for commits, ch - ScreenRecorder by AutumnVN (Vesktop & Equibop only) - SearchFix by Jaxx - SekaiStickers by MaiKokain -- ServerSearch by camila314 - Shakespearean by vmohammad (Dev build only) - ShowBadgesInChat by Inbestigator & KrystalSkull - Slap by Korbo diff --git a/src/equicordplugins/channelTabs/index.tsx b/src/equicordplugins/channelTabs/index.tsx index aa88ca7b..0743fb3c 100644 --- a/src/equicordplugins/channelTabs/index.tsx +++ b/src/equicordplugins/channelTabs/index.tsx @@ -79,7 +79,7 @@ export default definePlugin({ { find: ".messagesPopoutWrap", replacement: { - match: /\i&&\((\i).maxHeight-=\d{1,3}\)/, + match: /\i&&\((\i).maxHeight.{1,5}\)/, replace: "$&;$1.maxHeight-=$self.containerHeight" } }, diff --git a/src/equicordplugins/clientSideBlock/index.tsx b/src/equicordplugins/clientSideBlock/index.tsx index 549dd3d8..d7c5f657 100644 --- a/src/equicordplugins/clientSideBlock/index.tsx +++ b/src/equicordplugins/clientSideBlock/index.tsx @@ -216,7 +216,7 @@ export default definePlugin({ { find: "}getMutualFriends(", replacement: { - match: /(getMutualFriends\(\i\){)return (\i\[\i\])/, + match: /(getMutualFriends\(\i\){)return (\i\.get\(\i\))/, replace: "$1if($2 != undefined) return $2.filter(u => !$self.shouldHideUser(u.key))" } } diff --git a/src/equicordplugins/deadMembers/index.tsx b/src/equicordplugins/deadMembers/index.tsx deleted file mode 100644 index 7e253de4..00000000 --- a/src/equicordplugins/deadMembers/index.tsx +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Vencord, a Discord client mod - * Copyright (c) 2024 Vendicated and contributors - * SPDX-License-Identifier: GPL-3.0-or-later - */ - -import { Devs } from "@utils/constants"; -import definePlugin from "@utils/types"; -import { ChannelStore, GuildMemberStore, useStateFromStores } from "@webpack/common"; - -export default definePlugin({ - name: "DeadMembers", - description: "Shows when the sender of a message has left the guild", - authors: [Devs.Kyuuhachi], - - patches: [ - { - find: '.BADGES=1]="BADGES"', - replacement: { - match: /(\i)=\{className:\i.username,style:.*?onContextMenu:\i,children:.*?\},/, - replace: "$&__dummyvar=($1.children=$self.wrapMessageAuthor(arguments[0],$1.children))," - } - }, - { - find: "Messages.FORUM_POST_AUTHOR_A11Y_LABEL", - replacement: { - match: /(?<=\}=(\i),\{(user:\i,author:\i)\}=.{0,400}?\(\i\.Fragment,{children:)\i(?=}\),)/, - replace: "$self.wrapForumAuthor({...$1,$2},$&)" - } - }, - ], - - wrapMessageAuthor({ message }, text) { - const channel = ChannelStore.getChannel(message.channel_id); - return message.webhookId - ? text - : ; - }, - - wrapForumAuthor({ channel, user }, text) { - return !user - ? text - : ; - }, -}); - - -function DeadIndicator({ channel, userId, text }) { - const isMember = useStateFromStores( - [GuildMemberStore], - () => GuildMemberStore.isMember(channel?.guild_id, userId), - ); - return channel?.guild_id && !isMember ? {text} : text; -} diff --git a/src/equicordplugins/messageColors/index.tsx b/src/equicordplugins/messageColors/index.tsx index 6dd0ea4f..4d79a6c5 100644 --- a/src/equicordplugins/messageColors/index.tsx +++ b/src/equicordplugins/messageColors/index.tsx @@ -55,8 +55,8 @@ export default definePlugin({ find: ".defaultRules.text,match:", group: true, replacement: { - // $)/) - match: /\$\)\/\)}/, + // $) + match: /\$\)/, // hsl(|rgb(|$& replace: requiredFirstCharacters.join("|") + "|$&", }, diff --git a/src/equicordplugins/messageLoggerEnhanced/index.tsx b/src/equicordplugins/messageLoggerEnhanced/index.tsx index c1a4587a..f6ea460e 100644 --- a/src/equicordplugins/messageLoggerEnhanced/index.tsx +++ b/src/equicordplugins/messageLoggerEnhanced/index.tsx @@ -580,8 +580,8 @@ export default definePlugin({ { find: '"MessageStore"', replacement: { - match: /LOAD_MESSAGES_SUCCESS:function\(\i\){/, - replace: "$&$self.messageLoadSuccess(arguments[0]);" + match: /getOrCreate\(\i\);\i=\i\.loadComplete.*?}\),/, + replace: "$self.messageLoadSuccess(arguments[0]);" } }, diff --git a/src/equicordplugins/modalFade/index.tsx b/src/equicordplugins/modalFade/index.tsx index 1d858b2e..b2304a95 100644 --- a/src/equicordplugins/modalFade/index.tsx +++ b/src/equicordplugins/modalFade/index.tsx @@ -58,12 +58,12 @@ export default definePlugin({ } }, { - find: "{})).SUBTLE=\"SUBTLE\"", + find: ".SUBTLE=\"SUBTLE\"", replacement: { match: /\(0,\i\.useTransition\)*/, replace: "$self.nullTransition" } - }, + } ], nullTransition(value: any, args: object) { diff --git a/src/equicordplugins/replaceActivityTypes/index.tsx b/src/equicordplugins/replaceActivityTypes/index.tsx index 13644e18..caf9f2a3 100644 --- a/src/equicordplugins/replaceActivityTypes/index.tsx +++ b/src/equicordplugins/replaceActivityTypes/index.tsx @@ -53,9 +53,9 @@ export default definePlugin({ patches: [ // how has this patch not broken yet lol (i do not like fixing patches tho) { - find: '="LocalActivityStore",', + find: '"LocalActivityStore"', replacement: { - match: /LOCAL_ACTIVITY_UPDATE:function\((\i)\)\{/, + match: /\i\((\i)\)\{.{0,50}activity.{0,10}=\i;/, replace: "$&$self.patchActivity($1.activity);", } } diff --git a/src/equicordplugins/serverSearch/index.tsx b/src/equicordplugins/serverSearch/index.tsx deleted file mode 100644 index 9f1f1df9..00000000 --- a/src/equicordplugins/serverSearch/index.tsx +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Vencord, a Discord client mod - * Copyright (c) 2023 Vendicated, camila314, and contributors - * SPDX-License-Identifier: GPL-3.0-or-later - */ - -import "./styles.css"; - -import { addServerListElement, removeServerListElement, ServerListRenderPosition } from "@api/ServerList"; -import ErrorBoundary from "@components/ErrorBoundary"; -import { EquicordDevs } from "@utils/constants"; -import definePlugin from "@utils/types"; -import { findByCodeLazy } from "@webpack"; -import { Tooltip } from "webpack/common/components"; - -const openPopout = findByCodeLazy(".QUICKSWITCHER_OPENED,{"); -function SearchIcon() { - return ( - - - - ); -} - -export default definePlugin({ - name: "ServerSearch", - authors: [EquicordDevs.camila314], - description: "Navigate your servers better with a quick search button", - - renderButton() { - return -
- - {({ onMouseEnter, onMouseLeave }) => ( -
openPopout("DM_SEARCH")}> - -
- )} -
-
-
; - }, - - start() { - addServerListElement(ServerListRenderPosition.Above, this.renderButton); - }, - - stop() { - removeServerListElement(ServerListRenderPosition.Above, this.renderButton); - } -}); diff --git a/src/equicordplugins/serverSearch/styles.css b/src/equicordplugins/serverSearch/styles.css deleted file mode 100644 index db2e745a..00000000 --- a/src/equicordplugins/serverSearch/styles.css +++ /dev/null @@ -1,33 +0,0 @@ -#vc-searchbutton-container { - width: 100%; - display: flex; - align-items: center; - justify-content: center; - margin-bottom: 8px; -} - -#vc-searchbutton { - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - background-color: var(--background-primary); - height: 48px; - width: 48px; - border-radius: 100%; - transition: border-radius 0.15s ease-out, background-color 0.15s ease-out; -} - -#vc-searchbutton-icon { - color: var(--text-normal); -} - -#vc-searchbutton:hover { - border-radius: 34%; - background-color: var(--green-360); - cursor: pointer; -} - -#vc-searchbutton:hover #vc-searchbutton-icon { - color: var(--white-500); -} diff --git a/src/plugins/showMeYourName/index.tsx b/src/plugins/showMeYourName/index.tsx index 4f9fcf30..bbafb58d 100644 --- a/src/plugins/showMeYourName/index.tsx +++ b/src/plugins/showMeYourName/index.tsx @@ -48,7 +48,7 @@ export default definePlugin({ authors: [Devs.Rini, Devs.TheKodeToad], patches: [ { - find: '?"@":"")', + find: '?"@":""', replacement: { match: /(?<=onContextMenu:\i,children:).*?\)}/, replace: "$self.renderUsername(arguments[0])}" From 22a755b25d300c974c9477208d0fb2353e34e10d Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Wed, 25 Sep 2024 17:10:47 -0400 Subject: [PATCH 04/11] Fix Channel Tabs --- .../channelTabs/components/BookmarkContainer.tsx | 5 +++-- .../channelTabs/components/ContextMenus.tsx | 7 ++++--- src/equicordplugins/channelTabs/index.tsx | 3 +++ src/webpack/common/utils.ts | 4 ---- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/equicordplugins/channelTabs/components/BookmarkContainer.tsx b/src/equicordplugins/channelTabs/components/BookmarkContainer.tsx index 4cc2ae7c..8c97d9d2 100644 --- a/src/equicordplugins/channelTabs/components/BookmarkContainer.tsx +++ b/src/equicordplugins/channelTabs/components/BookmarkContainer.tsx @@ -8,8 +8,9 @@ import { classNameFactory } from "@api/Styles"; import { classes } from "@utils/misc"; import { closeModal, openModal } from "@utils/modal"; import { findByPropsLazy } from "@webpack"; -import { Avatar, ChannelStore, ContextMenuApi, FluxDispatcher, GuildStore, i18n, Menu, ReadStateStore, ReadStateUtils, Text, Tooltip, useDrag, useDrop, useEffect, useRef, UserStore } from "@webpack/common"; +import { Avatar, ChannelStore, ContextMenuApi, FluxDispatcher, GuildStore, i18n, Menu, ReadStateStore, Text, Tooltip, useDrag, useDrop, useEffect, useRef, UserStore } from "@webpack/common"; +import { ackChannel } from ".."; import { BasicChannelTabsProps, Bookmark, BookmarkFolder, BookmarkProps, CircleQuestionIcon, isBookmarkFolder, settings, switchChannel, useBookmarks } from "../util"; import { NotificationDot } from "./ChannelTab"; import { BookmarkContextMenu, EditModal } from "./ContextMenus"; @@ -110,7 +111,7 @@ function BookmarkFolderOpenMenu(props: BookmarkProps) { id="mark-as-read" label={i18n.Messages.MARK_AS_READ} disabled={!ReadStateStore.hasUnread(b.channelId)} - action={() => ReadStateUtils.ackChannel(ChannelStore.getChannel(b.channelId))} + action={() => ackChannel(ChannelStore.getChannel(b.channelId))} /> ), diff --git a/src/equicordplugins/channelTabs/components/ContextMenus.tsx b/src/equicordplugins/channelTabs/components/ContextMenus.tsx index 38a74a62..a3d3d410 100644 --- a/src/equicordplugins/channelTabs/components/ContextMenus.tsx +++ b/src/equicordplugins/channelTabs/components/ContextMenus.tsx @@ -6,8 +6,9 @@ import { Margins } from "@utils/margins"; import { closeModal, ModalContent, ModalFooter, ModalHeader, ModalProps, ModalRoot, openModal } from "@utils/modal"; -import { Button, ChannelStore, FluxDispatcher, Forms, i18n, Menu, ReadStateStore, ReadStateUtils, Select, Text, TextInput, useState } from "@webpack/common"; +import { Button, ChannelStore, FluxDispatcher, Forms, i18n, Menu, ReadStateStore, Select, Text, TextInput, useState } from "@webpack/common"; +import { ackChannel } from ".."; import { bookmarkFolderColors, bookmarkPlaceholderName, closeOtherTabs, closeTab, closeTabsToTheLeft, closeTabsToTheRight, createTab, hasClosedTabs, isBookmarkFolder, openedTabs, reopenClosedTab, settings, toggleCompactTab } from "../util"; import { Bookmark, BookmarkFolder, Bookmarks, ChannelTabsProps, UseBookmarkMethods } from "../util/types"; @@ -179,7 +180,7 @@ export function BookmarkContextMenu({ bookmarks, index, methods }: { bookmarks: id="mark-as-read" label={i18n.Messages.MARK_AS_READ} disabled={!ReadStateStore.hasUnread(bookmark.channelId)} - action={() => ReadStateUtils.ackChannel(ChannelStore.getChannel(bookmark.channelId))} + action={() => ackChannel(ChannelStore.getChannel(bookmark.channelId))} /> } {isFolder @@ -289,7 +290,7 @@ export function TabContextMenu({ tab }: { tab: ChannelTabsProps; }) { id="mark-as-read" label={i18n.Messages.MARK_AS_READ} disabled={!ReadStateStore.hasUnread(channel.id)} - action={() => ReadStateUtils.ackChannel(channel)} + action={() => ackChannel(channel)} /> } () => { const { channel, messageId } = props; diff --git a/src/webpack/common/utils.ts b/src/webpack/common/utils.ts index 5ce401b2..eb589f22 100644 --- a/src/webpack/common/utils.ts +++ b/src/webpack/common/utils.ts @@ -172,10 +172,6 @@ export const InviteActions = findByPropsLazy("resolveInvite"); export const IconUtils: t.IconUtils = findByPropsLazy("getGuildBannerURL", "getUserAvatarURL"); -export const ReadStateUtils = mapMangledModuleLazy('type:"ENABLE_AUTOMATIC_ACK",', { - ackChannel: filters.byCode(".getActiveJoinedThreadsForParent(") -}); - export const ExpressionPickerStore: t.ExpressionPickerStore = mapMangledModuleLazy("expression-picker-last-active-view", { openExpressionPicker: filters.byCode(/setState\({activeView:(?:(?!null)\i),activeViewType:/), closeExpressionPicker: filters.byCode("setState({activeView:null"), From 1abfb5f0cfad7a2c37251c15791cb5eaba51a220 Mon Sep 17 00:00:00 2001 From: Vendicated Date: Wed, 25 Sep 2024 23:11:43 +0200 Subject: [PATCH 05/11] CustomIdle: fix crash on canary --- src/plugins/customidle/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/customidle/index.ts b/src/plugins/customidle/index.ts index ea56da10..7d353f15 100644 --- a/src/plugins/customidle/index.ts +++ b/src/plugins/customidle/index.ts @@ -37,8 +37,8 @@ export default definePlugin({ find: 'type:"IDLE",idle:', replacement: [ { - match: /(?<=Date\.now\(\)-\i>)\i\.\i/, - replace: "$self.getIdleTimeout()" + match: /(?<=Date\.now\(\)-\i>)\i\.\i\|\|/, + replace: "$self.getIdleTimeout()||" }, { match: /Math\.min\((\i\.\i\.getSetting\(\)\*\i\.\i\.\i\.SECOND),\i\.\i\)/, From 81965dfdc01b3a54a2d336d629c5315afe7e4877 Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Wed, 25 Sep 2024 17:13:39 -0400 Subject: [PATCH 06/11] Revert "Fix Channel Tabs" This reverts commit 22a755b25d300c974c9477208d0fb2353e34e10d. --- .../channelTabs/components/BookmarkContainer.tsx | 5 ++--- .../channelTabs/components/ContextMenus.tsx | 7 +++---- src/equicordplugins/channelTabs/index.tsx | 3 --- src/webpack/common/utils.ts | 4 ++++ 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/equicordplugins/channelTabs/components/BookmarkContainer.tsx b/src/equicordplugins/channelTabs/components/BookmarkContainer.tsx index 8c97d9d2..4cc2ae7c 100644 --- a/src/equicordplugins/channelTabs/components/BookmarkContainer.tsx +++ b/src/equicordplugins/channelTabs/components/BookmarkContainer.tsx @@ -8,9 +8,8 @@ import { classNameFactory } from "@api/Styles"; import { classes } from "@utils/misc"; import { closeModal, openModal } from "@utils/modal"; import { findByPropsLazy } from "@webpack"; -import { Avatar, ChannelStore, ContextMenuApi, FluxDispatcher, GuildStore, i18n, Menu, ReadStateStore, Text, Tooltip, useDrag, useDrop, useEffect, useRef, UserStore } from "@webpack/common"; +import { Avatar, ChannelStore, ContextMenuApi, FluxDispatcher, GuildStore, i18n, Menu, ReadStateStore, ReadStateUtils, Text, Tooltip, useDrag, useDrop, useEffect, useRef, UserStore } from "@webpack/common"; -import { ackChannel } from ".."; import { BasicChannelTabsProps, Bookmark, BookmarkFolder, BookmarkProps, CircleQuestionIcon, isBookmarkFolder, settings, switchChannel, useBookmarks } from "../util"; import { NotificationDot } from "./ChannelTab"; import { BookmarkContextMenu, EditModal } from "./ContextMenus"; @@ -111,7 +110,7 @@ function BookmarkFolderOpenMenu(props: BookmarkProps) { id="mark-as-read" label={i18n.Messages.MARK_AS_READ} disabled={!ReadStateStore.hasUnread(b.channelId)} - action={() => ackChannel(ChannelStore.getChannel(b.channelId))} + action={() => ReadStateUtils.ackChannel(ChannelStore.getChannel(b.channelId))} /> ), diff --git a/src/equicordplugins/channelTabs/components/ContextMenus.tsx b/src/equicordplugins/channelTabs/components/ContextMenus.tsx index a3d3d410..38a74a62 100644 --- a/src/equicordplugins/channelTabs/components/ContextMenus.tsx +++ b/src/equicordplugins/channelTabs/components/ContextMenus.tsx @@ -6,9 +6,8 @@ import { Margins } from "@utils/margins"; import { closeModal, ModalContent, ModalFooter, ModalHeader, ModalProps, ModalRoot, openModal } from "@utils/modal"; -import { Button, ChannelStore, FluxDispatcher, Forms, i18n, Menu, ReadStateStore, Select, Text, TextInput, useState } from "@webpack/common"; +import { Button, ChannelStore, FluxDispatcher, Forms, i18n, Menu, ReadStateStore, ReadStateUtils, Select, Text, TextInput, useState } from "@webpack/common"; -import { ackChannel } from ".."; import { bookmarkFolderColors, bookmarkPlaceholderName, closeOtherTabs, closeTab, closeTabsToTheLeft, closeTabsToTheRight, createTab, hasClosedTabs, isBookmarkFolder, openedTabs, reopenClosedTab, settings, toggleCompactTab } from "../util"; import { Bookmark, BookmarkFolder, Bookmarks, ChannelTabsProps, UseBookmarkMethods } from "../util/types"; @@ -180,7 +179,7 @@ export function BookmarkContextMenu({ bookmarks, index, methods }: { bookmarks: id="mark-as-read" label={i18n.Messages.MARK_AS_READ} disabled={!ReadStateStore.hasUnread(bookmark.channelId)} - action={() => ackChannel(ChannelStore.getChannel(bookmark.channelId))} + action={() => ReadStateUtils.ackChannel(ChannelStore.getChannel(bookmark.channelId))} /> } {isFolder @@ -290,7 +289,7 @@ export function TabContextMenu({ tab }: { tab: ChannelTabsProps; }) { id="mark-as-read" label={i18n.Messages.MARK_AS_READ} disabled={!ReadStateStore.hasUnread(channel.id)} - action={() => ackChannel(channel)} + action={() => ReadStateUtils.ackChannel(channel)} /> } () => { const { channel, messageId } = props; diff --git a/src/webpack/common/utils.ts b/src/webpack/common/utils.ts index eb589f22..5ce401b2 100644 --- a/src/webpack/common/utils.ts +++ b/src/webpack/common/utils.ts @@ -172,6 +172,10 @@ export const InviteActions = findByPropsLazy("resolveInvite"); export const IconUtils: t.IconUtils = findByPropsLazy("getGuildBannerURL", "getUserAvatarURL"); +export const ReadStateUtils = mapMangledModuleLazy('type:"ENABLE_AUTOMATIC_ACK",', { + ackChannel: filters.byCode(".getActiveJoinedThreadsForParent(") +}); + export const ExpressionPickerStore: t.ExpressionPickerStore = mapMangledModuleLazy("expression-picker-last-active-view", { openExpressionPicker: filters.byCode(/setState\({activeView:(?:(?!null)\i),activeViewType:/), closeExpressionPicker: filters.byCode("setState({activeView:null"), From e79f7159e1dc20d6a3a658889a007e0040e55124 Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Wed, 25 Sep 2024 17:35:07 -0400 Subject: [PATCH 07/11] Fix ChannelTabs --- src/webpack/common/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webpack/common/utils.ts b/src/webpack/common/utils.ts index 5ce401b2..0d52f2f2 100644 --- a/src/webpack/common/utils.ts +++ b/src/webpack/common/utils.ts @@ -173,7 +173,7 @@ export const InviteActions = findByPropsLazy("resolveInvite"); export const IconUtils: t.IconUtils = findByPropsLazy("getGuildBannerURL", "getUserAvatarURL"); export const ReadStateUtils = mapMangledModuleLazy('type:"ENABLE_AUTOMATIC_ACK",', { - ackChannel: filters.byCode(".getActiveJoinedThreadsForParent(") + ackChannel: filters.byCode(".isForumLikeChannel(") }); export const ExpressionPickerStore: t.ExpressionPickerStore = mapMangledModuleLazy("expression-picker-last-active-view", { From 447c492991a98579bfd3490dfc174ffba8b9a0fe Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Wed, 25 Sep 2024 17:37:26 -0400 Subject: [PATCH 08/11] Fix MessageLoggerEnhanced --- src/equicordplugins/messageLoggerEnhanced/index.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/equicordplugins/messageLoggerEnhanced/index.tsx b/src/equicordplugins/messageLoggerEnhanced/index.tsx index f6ea460e..382a09e5 100644 --- a/src/equicordplugins/messageLoggerEnhanced/index.tsx +++ b/src/equicordplugins/messageLoggerEnhanced/index.tsx @@ -581,10 +581,9 @@ export default definePlugin({ find: '"MessageStore"', replacement: { match: /getOrCreate\(\i\);\i=\i\.loadComplete.*?}\),/, - replace: "$self.messageLoadSuccess(arguments[0]);" + replace: "$&$self.messageLoadSuccess(arguments[0]);" } }, - { find: "THREAD_STARTER_MESSAGE?null===", replacement: { From bc59fc41b3cdcca7f858a915011fcef9692f0c42 Mon Sep 17 00:00:00 2001 From: sadan4 <117494111+sadan4@users.noreply.github.com> Date: Wed, 25 Sep 2024 21:25:48 -0400 Subject: [PATCH 09/11] Fix multiple plugins for latest Discord update (#2911) Co-authored-by: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Co-authored-by: thororen1234 <78185467+thororen1234@users.noreply.github.com> --- src/plugins/_api/notices.ts | 4 +-- src/plugins/anonymiseFileNames/index.tsx | 2 +- src/plugins/consoleJanitor/index.ts | 2 +- src/plugins/decor/index.tsx | 2 +- src/plugins/fakeNitro/index.tsx | 34 +++++++++--------- src/plugins/ignoreActivities/index.tsx | 4 +-- src/plugins/messageLogger/index.tsx | 44 ++++++++++++------------ src/plugins/moreUserTags/index.tsx | 8 ++--- src/plugins/noBlockedMessages/index.ts | 6 ++-- src/plugins/noPendingCount/index.ts | 4 +-- src/plugins/replyTimestamp/index.tsx | 4 +-- src/plugins/showHiddenChannels/index.tsx | 4 +-- src/plugins/showMeYourName/index.tsx | 2 +- src/plugins/superReactionTweaks/index.ts | 4 +-- src/plugins/userVoiceShow/components.tsx | 2 +- src/plugins/volumeBooster/index.ts | 2 +- src/plugins/whoReacted/index.tsx | 7 ++-- 17 files changed, 68 insertions(+), 67 deletions(-) diff --git a/src/plugins/_api/notices.ts b/src/plugins/_api/notices.ts index 0c6f6e1d..ceec6f82 100644 --- a/src/plugins/_api/notices.ts +++ b/src/plugins/_api/notices.ts @@ -33,8 +33,8 @@ export default definePlugin({ replace: "if(Vencord.Api.Notices.currentNotice)return false;$&" }, { - match: /(?<=,NOTICE_DISMISS:function\(\i\){)return null!=(\i)/, - replace: "if($1.id==\"VencordNotice\")return($1=null,Vencord.Api.Notices.nextNotice(),true);$&" + match: /(?<=function (\i)\(\i\){)return null!=(\i)(?=.*NOTICE_DISMISS:\1)/, + replace: "if($2.id==\"VencordNotice\")return($2=null,Vencord.Api.Notices.nextNotice(),true);$&" } ] } diff --git a/src/plugins/anonymiseFileNames/index.tsx b/src/plugins/anonymiseFileNames/index.tsx index 526ccd12..0e97bc7f 100644 --- a/src/plugins/anonymiseFileNames/index.tsx +++ b/src/plugins/anonymiseFileNames/index.tsx @@ -71,7 +71,7 @@ export default definePlugin({ description: "Anonymise uploaded file names", patches: [ { - find: "instantBatchUpload:function", + find: "instantBatchUpload:", replacement: { match: /uploadFiles:(\i),/, replace: diff --git a/src/plugins/consoleJanitor/index.ts b/src/plugins/consoleJanitor/index.ts index b0c8905f..1cb70554 100644 --- a/src/plugins/consoleJanitor/index.ts +++ b/src/plugins/consoleJanitor/index.ts @@ -119,7 +119,7 @@ export default definePlugin({ { find: "Slow dispatch on", replacement: { - match: /\i\.totalTime>100&&\i\.verbose\("Slow dispatch on ".+?\)\);/, + match: /\i\.totalTime>\i&&\i\.verbose\("Slow dispatch on ".+?\)\);/, replace: "" } }, diff --git a/src/plugins/decor/index.tsx b/src/plugins/decor/index.tsx index c6cd895f..33d1d40b 100644 --- a/src/plugins/decor/index.tsx +++ b/src/plugins/decor/index.tsx @@ -54,7 +54,7 @@ export default definePlugin({ replace: "$self.DecorationGridItem=$&" }, { - match: /(?<==)\i=>{let{user:\i,avatarDecoration.{300,600}decorationGridItemChurned/, + match: /(?<==)\i=>{let{user:\i,avatarDecoration/, replace: "$self.DecorationGridDecoration=$&" }, // Remove NEW label from decor avatar decorations diff --git a/src/plugins/fakeNitro/index.tsx b/src/plugins/fakeNitro/index.tsx index 2a7a0ee7..cfffedb9 100644 --- a/src/plugins/fakeNitro/index.tsx +++ b/src/plugins/fakeNitro/index.tsx @@ -254,11 +254,11 @@ export default definePlugin({ }, // Allow stickers to be sent everywhere { - find: "canUseCustomStickersEverywhere:function", + find: "canUseCustomStickersEverywhere:", predicate: () => settings.store.enableStickerBypass, replacement: { - match: /canUseCustomStickersEverywhere:function\(\i\){/, - replace: "$&return true;" + match: /(?<=canUseCustomStickersEverywhere:)\i/, + replace: "()=>true" }, }, // Make stickers always available @@ -272,15 +272,15 @@ export default definePlugin({ }, // Allow streaming with high quality { - find: "canUseHighVideoUploadQuality:function", + find: "canUseHighVideoUploadQuality:", predicate: () => settings.store.enableStreamQualityBypass, replacement: [ "canUseHighVideoUploadQuality", "canStreamQuality", ].map(func => { return { - match: new RegExp(`${func}:function\\(\\i(?:,\\i)?\\){`, "g"), - replace: "$&return true;" + match: new RegExp(`(?<=${func}:)\\i`, "g"), + replace: "()=>true" }; }) }, @@ -295,10 +295,10 @@ export default definePlugin({ }, // Allow client themes to be changeable { - find: "canUseClientThemes:function", + find: "canUseClientThemes:", replacement: { - match: /canUseClientThemes:function\(\i\){/, - replace: "$&return true;" + match: /(?<=canUseClientThemes:)\i/, + replace: "()=>true" } }, { @@ -306,8 +306,8 @@ export default definePlugin({ replacement: [ { // Overwrite incoming connection settings proto with our local settings - match: /CONNECTION_OPEN:function\((\i)\){/, - replace: (m, props) => `${m}$self.handleProtoChange(${props}.userSettingsProto,${props}.user);` + match: /function (\i)\((\i)\){(?=.*CONNECTION_OPEN:\1)/, + replace: (m, funcName, props) => `${m}$self.handleProtoChange(${props}.userSettingsProto,${props}.user);` }, { // Overwrite non local proto changes with our local settings @@ -400,10 +400,10 @@ export default definePlugin({ }, // Allow using custom app icons { - find: "canUsePremiumAppIcons:function", + find: "canUsePremiumAppIcons:", replacement: { - match: /canUsePremiumAppIcons:function\(\i\){/, - replace: "$&return true;" + match: /(?<=canUsePremiumAppIcons:)\i/, + replace: "()=>true" } }, // Separate patch for allowing using custom app icons @@ -424,10 +424,10 @@ export default definePlugin({ }, // Allow using custom notification sounds { - find: "canUseCustomNotificationSounds:function", + find: "canUseCustomNotificationSounds:", replacement: { - match: /canUseCustomNotificationSounds:function\(\i\){/, - replace: "$&return true;" + match: /(?<=canUseCustomNotificationSounds:)\i/, + replace: "()=>true" } } ], diff --git a/src/plugins/ignoreActivities/index.tsx b/src/plugins/ignoreActivities/index.tsx index 8c36e1d7..19f22e61 100644 --- a/src/plugins/ignoreActivities/index.tsx +++ b/src/plugins/ignoreActivities/index.tsx @@ -244,7 +244,7 @@ export default definePlugin({ patches: [ { - find: '="LocalActivityStore",', + find: '"LocalActivityStore"', replacement: [ { match: /HANG_STATUS.+?(?=!\i\(\)\(\i,\i\)&&)(?<=(\i)\.push.+?)/, @@ -253,7 +253,7 @@ export default definePlugin({ ] }, { - find: '="ActivityTrackingStore",', + find: '"ActivityTrackingStore"', replacement: { match: /getVisibleRunningGames\(\).+?;(?=for)(?<=(\i)=\i\.\i\.getVisibleRunningGames.+?)/, replace: (m, runningGames) => `${m}${runningGames}=${runningGames}.filter(({id,name})=>$self.isActivityNotIgnored({type:0,application_id:id,name}));` diff --git a/src/plugins/messageLogger/index.tsx b/src/plugins/messageLogger/index.tsx index a08aeccc..70672e9e 100644 --- a/src/plugins/messageLogger/index.tsx +++ b/src/plugins/messageLogger/index.tsx @@ -323,35 +323,35 @@ export default definePlugin({ replacement: [ { // Add deleted=true to all target messages in the MESSAGE_DELETE event - match: /MESSAGE_DELETE:function\((\i)\){let.+?((?:\i\.){2})getOrCreate.+?},/, + match: /function (\i)\((\i)\){let.+?((?:\i\.){2})getOrCreate.+?}(?=function.*MESSAGE_DELETE:\1)/, replace: - "MESSAGE_DELETE:function($1){" + - " var cache = $2getOrCreate($1.channelId);" + - " cache = $self.handleDelete(cache, $1, false);" + - " $2commit(cache);" + - "}," + "function $1($2){" + + " var cache = $3getOrCreate($2.channelId);" + + " cache = $self.handleDelete(cache, $2, false);" + + " $3commit(cache);" + + "}" }, { // Add deleted=true to all target messages in the MESSAGE_DELETE_BULK event - match: /MESSAGE_DELETE_BULK:function\((\i)\){let.+?((?:\i\.){2})getOrCreate.+?},/, + match: /function (\i)\((\i)\){let.+?((?:\i\.){2})getOrCreate.+?}(?=function.*MESSAGE_DELETE_BULK:\1)/, replace: - "MESSAGE_DELETE_BULK:function($1){" + - " var cache = $2getOrCreate($1.channelId);" + - " cache = $self.handleDelete(cache, $1, true);" + - " $2commit(cache);" + - "}," + "function $1($2){" + + " var cache = $3getOrCreate($2.channelId);" + + " cache = $self.handleDelete(cache, $2, true);" + + " $3commit(cache);" + + "}" }, { // Add current cached content + new edit time to cached message's editHistory - match: /(MESSAGE_UPDATE:function\((\i)\).+?)\.update\((\i)/, + match: /(function (\i)\((\i)\).+?)\.update\((\i)(?=.*MESSAGE_UPDATE:\2)/, replace: "$1" + - ".update($3,m =>" + - " (($2.message.flags & 64) === 64 || $self.shouldIgnore($2.message, true)) ? m :" + - " $2.message.edited_timestamp && $2.message.content !== m.content ?" + - " m.set('editHistory',[...(m.editHistory || []), $self.makeEdit($2.message, m)]) :" + + ".update($4,m =>" + + " (($3.message.flags & 64) === 64 || $self.shouldIgnore($3.message, true)) ? m :" + + " $3.message.edited_timestamp && $3.message.content !== m.content ?" + + " m.set('editHistory',[...(m.editHistory || []), $self.makeEdit($3.message, m)]) :" + " m" + ")" + - ".update($3" + ".update($4" }, { // fix up key (edit last message) attempting to edit a deleted message @@ -465,12 +465,12 @@ export default definePlugin({ find: '"ReferencedMessageStore"', replacement: [ { - match: /MESSAGE_DELETE:function\((\i)\).+?},/, - replace: "MESSAGE_DELETE:function($1){}," + match: /MESSAGE_DELETE:\i,/, + replace: "MESSAGE_DELETE:()=>{}," }, { - match: /MESSAGE_DELETE_BULK:function\((\i)\).+?},/, - replace: "MESSAGE_DELETE_BULK:function($1){}," + match: /MESSAGE_DELETE_BULK:\i,/, + replace: "MESSAGE_DELETE_BULK:()=>{}," } ] }, diff --git a/src/plugins/moreUserTags/index.tsx b/src/plugins/moreUserTags/index.tsx index 0a87c57a..eb0b3860 100644 --- a/src/plugins/moreUserTags/index.tsx +++ b/src/plugins/moreUserTags/index.tsx @@ -182,8 +182,8 @@ export default definePlugin({ { find: ".ORIGINAL_POSTER=", replacement: { - match: /\((\i)=\{\}\)\)\[(\i)\.BOT/, - replace: "($1=$self.getTagTypes()))[$2.BOT" + match: /(\i)=\{\}\)\);(?=let \i=100)/, + replace: "$1=$self.getTagTypes()));" } }, { @@ -249,8 +249,8 @@ export default definePlugin({ match: /user:\i,nick:\i,/, replace: "$&moreTags_channelId," }, { - match: /,botType:(\i),(?<=user:(\i).+?)/g, - replace: ",botType:$self.getTag({user:$2,channelId:moreTags_channelId,origType:$1,location:'not-chat'})," + match: /,botType:(\i),botVerified:(\i),(?!discriminatorClass:)(?<=user:(\i).+?)/g, + replace: ",botType:$self.getTag({user:$3,channelId:moreTags_channelId,origType:$1,location:'not-chat'}),botVerified:$2," } ] }, diff --git a/src/plugins/noBlockedMessages/index.ts b/src/plugins/noBlockedMessages/index.ts index 1ea5b529..7c87a7ab 100644 --- a/src/plugins/noBlockedMessages/index.ts +++ b/src/plugins/noBlockedMessages/index.ts @@ -40,15 +40,15 @@ export default definePlugin({ ] }, ...[ - '="MessageStore",', + '"MessageStore"', '"displayName","ReadStateStore")' ].map(find => ({ find, predicate: () => Settings.plugins.NoBlockedMessages.ignoreBlockedMessages === true, replacement: [ { - match: /(?<=MESSAGE_CREATE:function\((\i)\){)/, - replace: (_, props) => `if($self.isBlocked(${props}.message))return;` + match: /(?<=function (\i)\((\i)\){)(?=.*MESSAGE_CREATE:\1)/, + replace: (_, _funcName, props) => `if($self.isBlocked(${props}.message))return;` } ] })) diff --git a/src/plugins/noPendingCount/index.ts b/src/plugins/noPendingCount/index.ts index d3e27563..4619c2f0 100644 --- a/src/plugins/noPendingCount/index.ts +++ b/src/plugins/noPendingCount/index.ts @@ -74,10 +74,10 @@ export default definePlugin({ // This prevents the Message Requests tab from always hiding due to the previous patch (and is compatible with spam requests) // In short, only the red badge is hidden. Button visibility behavior isn't changed. { - find: ".getSpamChannelsCount(),", + find: ".getSpamChannelsCount();", predicate: () => settings.store.hideMessageRequestsCount, replacement: { - match: /(?<=getSpamChannelsCount\(\),\i=)\i\.getMessageRequestsCount\(\)/, + match: /(?<=getSpamChannelsCount\(\);return )\i\.getMessageRequestsCount\(\)/, replace: "$self.getRealMessageRequestCount()" } }, diff --git a/src/plugins/replyTimestamp/index.tsx b/src/plugins/replyTimestamp/index.tsx index 851a62b9..b0a01add 100644 --- a/src/plugins/replyTimestamp/index.tsx +++ b/src/plugins/replyTimestamp/index.tsx @@ -69,8 +69,8 @@ export default definePlugin({ { find: ".REPLY_QUOTE_MESSAGE_BLOCKED", replacement: { - match: /(?<="aria-label":\i,children:\[)(?=\i,\i,\i\])/, - replace: "$self.ReplyTimestamp(arguments[0])," + match: /\.onClickReply,.+?}\),(?=\i,\i,\i\])/, + replace: "$&$self.ReplyTimestamp(arguments[0])," } } ], diff --git a/src/plugins/showHiddenChannels/index.tsx b/src/plugins/showHiddenChannels/index.tsx index 01b0da4b..7f008c8c 100644 --- a/src/plugins/showHiddenChannels/index.tsx +++ b/src/plugins/showHiddenChannels/index.tsx @@ -444,7 +444,7 @@ export default definePlugin({ } }, { - find: '="GuildChannelStore",', + find: '"GuildChannelStore"', replacement: [ { // Make GuildChannelStore contain hidden channels @@ -453,7 +453,7 @@ export default definePlugin({ }, { // Filter hidden channels from GuildChannelStore.getChannels unless told otherwise - match: /(?<=getChannels\(\i)(\){.+?)return (.+?)}/, + match: /(?<=getChannels\(\i)(\){.*?)return (.+?)}/, replace: (_, rest, channels) => `,shouldIncludeHidden${rest}return $self.resolveGuildChannels(${channels},shouldIncludeHidden??arguments[0]==="@favorites");}` } ] diff --git a/src/plugins/showMeYourName/index.tsx b/src/plugins/showMeYourName/index.tsx index 4f9fcf30..bbafb58d 100644 --- a/src/plugins/showMeYourName/index.tsx +++ b/src/plugins/showMeYourName/index.tsx @@ -48,7 +48,7 @@ export default definePlugin({ authors: [Devs.Rini, Devs.TheKodeToad], patches: [ { - find: '?"@":"")', + find: '?"@":""', replacement: { match: /(?<=onContextMenu:\i,children:).*?\)}/, replace: "$self.renderUsername(arguments[0])}" diff --git a/src/plugins/superReactionTweaks/index.ts b/src/plugins/superReactionTweaks/index.ts index 188f868a..cbcb38ad 100644 --- a/src/plugins/superReactionTweaks/index.ts +++ b/src/plugins/superReactionTweaks/index.ts @@ -42,8 +42,8 @@ export default definePlugin({ { find: ",BURST_REACTION_EFFECT_PLAY", replacement: { - match: /(BURST_REACTION_EFFECT_PLAY:\i=>{.{50,100})(\i\(\i,\i\))>=\d+/, - replace: "$1!$self.shouldPlayBurstReaction($2)" + match: /((\i)=\i=>{.{50,100})(\i\(\i,\i\))>=\i(?=.*BURST_REACTION_EFFECT_PLAY:\2)/, + replace: "$1!$self.shouldPlayBurstReaction($3)" } }, { diff --git a/src/plugins/userVoiceShow/components.tsx b/src/plugins/userVoiceShow/components.tsx index c509f694..7a6f4dd2 100644 --- a/src/plugins/userVoiceShow/components.tsx +++ b/src/plugins/userVoiceShow/components.tsx @@ -21,7 +21,7 @@ const getDMChannelIcon = findByCodeLazy(".getChannelIconURL({"); const VoiceStateStore = findStoreLazy("VoiceStateStore"); const UserSummaryItem = findComponentByCodeLazy("defaultRenderUser", "showDefaultAvatarsForNullUsers"); -const Avatar = findComponentByCodeLazy(".AVATAR_STATUS_TYPING_16;"); +const Avatar = findComponentByCodeLazy(".status)/2):0"); const GroupDMAvatars = findComponentByCodeLazy(".AvatarSizeSpecs[", "getAvatarURL"); const ActionButtonClasses = findByPropsLazy("actionButton", "highlight"); diff --git a/src/plugins/volumeBooster/index.ts b/src/plugins/volumeBooster/index.ts index 490bf62c..370f4e96 100644 --- a/src/plugins/volumeBooster/index.ts +++ b/src/plugins/volumeBooster/index.ts @@ -89,7 +89,7 @@ export default definePlugin({ find: "AudioContextSettingsMigrated", replacement: [ { - match: /(?<=isLocalMute\(\i,\i\),volume:.+?volume:)\i(?=})/, + match: /(?<=isLocalMute\(\i,\i\),volume:(\i).+?\i\(\i,\i,)\1(?=\))/, replace: "$&>200?200:$&" }, { diff --git a/src/plugins/whoReacted/index.tsx b/src/plugins/whoReacted/index.tsx index 679fe714..bcd07079 100644 --- a/src/plugins/whoReacted/index.tsx +++ b/src/plugins/whoReacted/index.tsx @@ -109,11 +109,12 @@ export default definePlugin({ match: /(\i)\?null:\(0,\i\.jsx\)\(\i\.\i,{className:\i\.reactionCount,.*?}\),/, replace: "$&$1?null:$self.renderUsers(this.props)," } - }, { + }, + { find: '"MessageReactionsStore"', replacement: { - match: /(?<=CONNECTION_OPEN:function\(\){)(\i)={}/, - replace: "$&;$self.reactions=$1" + match: /function (\i)\(\){(\i)={}(?=.*CONNECTION_OPEN:\1)/, + replace: "$&;$self.reactions=$2;" } }, { From 7255eaaaff0b88b7f50aaa00d589b5ab57bac2a0 Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Thu, 26 Sep 2024 11:19:14 -0400 Subject: [PATCH 10/11] Migrate AtSomeone Settings --- src/equicordplugins/atSomeone/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/equicordplugins/atSomeone/index.ts b/src/equicordplugins/atSomeone/index.ts index 5a356a37..0dd315aa 100644 --- a/src/equicordplugins/atSomeone/index.ts +++ b/src/equicordplugins/atSomeone/index.ts @@ -5,10 +5,12 @@ */ import { addPreSendListener, removePreSendListener } from "@api/MessageEvents"; +import { migratePluginSettings } from "@api/Settings"; import { Devs } from "@utils/constants"; import definePlugin from "@utils/types"; import { ChannelStore, GuildMemberStore, SelectedChannelStore, SelectedGuildStore } from "@webpack/common"; +migratePluginSettings("AtSomeone", "atSomeone"); export default definePlugin({ name: "AtSomeone", authors: [Devs.Joona], From 2efc6a6736004ba4dbcb38c3077681ec445d4338 Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Thu, 26 Sep 2024 11:39:34 -0400 Subject: [PATCH 11/11] Some more canary fixes --- src/equicordplugins/channelTabs/index.tsx | 2 +- src/equicordplugins/messageColors/index.tsx | 4 ++-- src/equicordplugins/messageLoggerEnhanced/index.tsx | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/equicordplugins/channelTabs/index.tsx b/src/equicordplugins/channelTabs/index.tsx index 0743fb3c..06d5abd6 100644 --- a/src/equicordplugins/channelTabs/index.tsx +++ b/src/equicordplugins/channelTabs/index.tsx @@ -79,7 +79,7 @@ export default definePlugin({ { find: ".messagesPopoutWrap", replacement: { - match: /\i&&\((\i).maxHeight.{1,5}\)/, + match: /\i&&\((\i).maxHeight.{0,5}\)/, replace: "$&;$1.maxHeight-=$self.containerHeight" } }, diff --git a/src/equicordplugins/messageColors/index.tsx b/src/equicordplugins/messageColors/index.tsx index 4d79a6c5..d90f069d 100644 --- a/src/equicordplugins/messageColors/index.tsx +++ b/src/equicordplugins/messageColors/index.tsx @@ -55,8 +55,8 @@ export default definePlugin({ find: ".defaultRules.text,match:", group: true, replacement: { - // $) - match: /\$\)/, + // $) don't match with a " after the ) + match: /\$\)(?!")/, // hsl(|rgb(|$& replace: requiredFirstCharacters.join("|") + "|$&", }, diff --git a/src/equicordplugins/messageLoggerEnhanced/index.tsx b/src/equicordplugins/messageLoggerEnhanced/index.tsx index 382a09e5..7e7aff12 100644 --- a/src/equicordplugins/messageLoggerEnhanced/index.tsx +++ b/src/equicordplugins/messageLoggerEnhanced/index.tsx @@ -580,8 +580,8 @@ export default definePlugin({ { find: '"MessageStore"', replacement: { - match: /getOrCreate\(\i\);\i=\i\.loadComplete.*?}\),/, - replace: "$&$self.messageLoadSuccess(arguments[0]);" + match: /(getOrCreate\(\i\);)(\i=\i\.loadComplete.*?}\),)/, + replace: "$1$self.messageLoadSuccess(arguments[0]);$2" } }, {