From 109a1508b64e9bb1c1c9e4b26c5f73f01a2a3f09 Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Sun, 3 Nov 2024 03:15:59 -0500 Subject: [PATCH] Canary Fixes --- src/equicordplugins/anammox/index.ts | 4 ++-- src/equicordplugins/bannersEverywhere/index.tsx | 2 +- src/equicordplugins/betterBanReasons/index.tsx | 4 ++-- src/equicordplugins/betterInvites/index.tsx | 4 ++-- src/equicordplugins/betterQuickReact/index.tsx | 2 +- src/equicordplugins/betterUserArea/index.tsx | 2 +- src/equicordplugins/clientSideBlock/index.tsx | 2 +- src/equicordplugins/customTimestamps/index.tsx | 2 +- src/equicordplugins/deadMembers/index.tsx | 2 +- src/equicordplugins/frequentQuickSwitcher/index.tsx | 2 +- src/equicordplugins/friendTags/index.tsx | 2 +- src/equicordplugins/fullUserInChatbox/index.tsx | 2 +- src/equicordplugins/hideServers/index.tsx | 4 ++-- src/equicordplugins/homeTyping/index.tsx | 2 +- src/equicordplugins/identity/index.tsx | 2 +- src/equicordplugins/ignoreTerms/index.ts | 2 +- src/equicordplugins/keywordNotify/index.tsx | 6 +++--- src/equicordplugins/loginWithQR/index.tsx | 6 +++--- src/equicordplugins/messageLinkTooltip/index.tsx | 4 ++-- src/equicordplugins/moreStickers/index.tsx | 6 +++--- src/equicordplugins/noAppsAllowed/index.tsx | 6 +++--- src/equicordplugins/pinIcon/index.tsx | 4 ++-- src/equicordplugins/showBadgesInChat/index.tsx | 2 +- src/equicordplugins/sidebarChat/index.tsx | 2 +- src/equicordplugins/statusPresets/index.tsx | 6 +++--- src/equicordplugins/whitelistedEmojis/index.tsx | 2 +- src/equicordplugins/youtubeDescription/index.tsx | 2 +- 27 files changed, 43 insertions(+), 43 deletions(-) diff --git a/src/equicordplugins/anammox/index.ts b/src/equicordplugins/anammox/index.ts index e0861b60..64b55a52 100644 --- a/src/equicordplugins/anammox/index.ts +++ b/src/equicordplugins/anammox/index.ts @@ -99,7 +99,7 @@ export default definePlugin({ }, { // Emoji list - find: "Messages.EMOJI_PICKER_CREATE_EMOJI_TITLE,size:", + find: "isEmojiCategoryNitroLocked({", replacement: { match: /(\i)=\i\|\|!\i&&\i.\i.isEmojiCategoryNitroLocked\(\{[^}]*\}\);/, replace: "$&$1||" @@ -108,7 +108,7 @@ export default definePlugin({ }, { // Emoji category list - find: "Messages.EMOJI_CATEGORY_TOP_GUILD_EMOJI.format({", + find: "EMOJI_PICKER_REACTION_EMOJI_CLICKED;", replacement: { match: /(?<=(\i)\.unshift\((\i)\):)(?=\1\.push\(\2\))/, replace: "$2.isNitroLocked||" diff --git a/src/equicordplugins/bannersEverywhere/index.tsx b/src/equicordplugins/bannersEverywhere/index.tsx index d3e6b164..128a4356 100644 --- a/src/equicordplugins/bannersEverywhere/index.tsx +++ b/src/equicordplugins/bannersEverywhere/index.tsx @@ -39,7 +39,7 @@ export default definePlugin({ settings, patches: [ { - find: ".Messages.GUILD_OWNER,", + find: "MEMBER_LIST,tagUserId", replacement: { // We add the banner as a property while we can still access the user id diff --git a/src/equicordplugins/betterBanReasons/index.tsx b/src/equicordplugins/betterBanReasons/index.tsx index 853cd1b0..407e7efc 100644 --- a/src/equicordplugins/betterBanReasons/index.tsx +++ b/src/equicordplugins/betterBanReasons/index.tsx @@ -72,9 +72,9 @@ export default definePlugin({ authors: [Devs.Inbestigator], patches: [ { - find: "Messages.BAN_MULTIPLE_CONFIRM_TITLE", + find: "banReasonOtherClickable,children", replacement: [{ - match: /\[\{name:\i\.\i\.Messages\.BAN_REASON_OPTION_SPAM_ACCOUNT.+?\}\]/, + match: /\[\{name:\i\.\i.+?\}\]/, replace: "$self.getReasons()" }, { diff --git a/src/equicordplugins/betterInvites/index.tsx b/src/equicordplugins/betterInvites/index.tsx index e157d077..10859f19 100644 --- a/src/equicordplugins/betterInvites/index.tsx +++ b/src/equicordplugins/betterInvites/index.tsx @@ -37,10 +37,10 @@ export default definePlugin({ authors: [EquicordDevs.iamme], patches: [ { - find: ".Messages.HUB_INVITE_ANOTHER_SCHOOL_LINK", + find: ".GuildSplash,{guild", replacement: [ { - match: /,(\i)&&(\(.{0,15}\i\.TooltipContainer.+)(\i\.\i\.Messages.GUEST_MEMBERSHIP_EXPLANATION)/, + match: /,(\i)&&(\(.{0,15}\i\.TooltipContainer.{0,50}text:)(\i.{0,50}]\))/, replace: ",($1||((!$1)&&arguments[0].invite.expires_at)) && $2$self.RenderTip($1, $3, arguments[0].invite.expires_at)" }, { diff --git a/src/equicordplugins/betterQuickReact/index.tsx b/src/equicordplugins/betterQuickReact/index.tsx index c3186ec4..6a47d9b0 100644 --- a/src/equicordplugins/betterQuickReact/index.tsx +++ b/src/equicordplugins/betterQuickReact/index.tsx @@ -59,7 +59,7 @@ export default definePlugin({ } }, { - find: ".ADD_REACTION_NAMED.format", + find: "allNamesString,hideOnClick", group: true, replacement: [ // Override limit of emojis to display with offset hook. diff --git a/src/equicordplugins/betterUserArea/index.tsx b/src/equicordplugins/betterUserArea/index.tsx index 5724e5ec..bf77374a 100644 --- a/src/equicordplugins/betterUserArea/index.tsx +++ b/src/equicordplugins/betterUserArea/index.tsx @@ -15,7 +15,7 @@ export default definePlugin({ description: "Reworks the user area styling to fit more buttons and overall look nicer", authors: [Devs.Samwich], patches: [{ - find: ".Messages.ACCOUNT_SPEAKING_WHILE_MUTED", + find: "handleToggleSelfMute,onContextMenu", replacement: [ // add a custom class to make things easier diff --git a/src/equicordplugins/clientSideBlock/index.tsx b/src/equicordplugins/clientSideBlock/index.tsx index ee0ee741..b16b6aeb 100644 --- a/src/equicordplugins/clientSideBlock/index.tsx +++ b/src/equicordplugins/clientSideBlock/index.tsx @@ -167,7 +167,7 @@ export default definePlugin({ }, // "1 blocked message" { - find: "Messages.BLOCKED_MESSAGES_HIDE.format", + find: "blockedAction,children", replacement: { match: /\i.memo\(function\(\i\){/, replace: "$&return null;" diff --git a/src/equicordplugins/customTimestamps/index.tsx b/src/equicordplugins/customTimestamps/index.tsx index 59024930..e6c3e37f 100644 --- a/src/equicordplugins/customTimestamps/index.tsx +++ b/src/equicordplugins/customTimestamps/index.tsx @@ -67,7 +67,7 @@ export default definePlugin({ ), patches: [{ - find: "MESSAGE_EDITED_TIMESTAMP_A11Y_LABEL.format", + find: "timestampTooltip,delay", replacement: [ { match: /(?<=\i=\i\?)\(0,\i\.\i\)\((\i),"LT"\):\(0,\i\.\i\)\(\i\)/, diff --git a/src/equicordplugins/deadMembers/index.tsx b/src/equicordplugins/deadMembers/index.tsx index 7e253de4..b92c0054 100644 --- a/src/equicordplugins/deadMembers/index.tsx +++ b/src/equicordplugins/deadMembers/index.tsx @@ -22,7 +22,7 @@ export default definePlugin({ } }, { - find: "Messages.FORUM_POST_AUTHOR_A11Y_LABEL", + find: "stopPropagation:!0,ariaLabel", replacement: { match: /(?<=\}=(\i),\{(user:\i,author:\i)\}=.{0,400}?\(\i\.Fragment,{children:)\i(?=}\),)/, replace: "$self.wrapForumAuthor({...$1,$2},$&)" diff --git a/src/equicordplugins/frequentQuickSwitcher/index.tsx b/src/equicordplugins/frequentQuickSwitcher/index.tsx index 52994d9c..a9aa09c6 100644 --- a/src/equicordplugins/frequentQuickSwitcher/index.tsx +++ b/src/equicordplugins/frequentQuickSwitcher/index.tsx @@ -41,7 +41,7 @@ export default definePlugin({ generateSearchResults: generateSearchResults, patches: [ { - find: ".QUICKSWITCHER_PLACEHOLDER", + find: "uery,spellCheck:!1,autoFocus", replacement: { match: /let{selectedIndex:\i,results:\i}/, replace: "this.props.results = $self.generateSearchResults(this.state.query);$&" diff --git a/src/equicordplugins/friendTags/index.tsx b/src/equicordplugins/friendTags/index.tsx index e6c2b9d9..00311196 100644 --- a/src/equicordplugins/friendTags/index.tsx +++ b/src/equicordplugins/friendTags/index.tsx @@ -212,7 +212,7 @@ export default definePlugin({ queryFriendTags: queryFriendTags, patches: [ { - find: ".QUICKSWITCHER_PLACEHOLDER", + find: "query,spellCheck:!1,autoFocus", replacement: { match: /let{selectedIndex:\i,results:\i}/, replace: "if(this.state.query.includes(\"&\")){ this.props.results = $self.queryFriendTags(this.state.query); }$&" diff --git a/src/equicordplugins/fullUserInChatbox/index.tsx b/src/equicordplugins/fullUserInChatbox/index.tsx index 51e60676..10afc47f 100644 --- a/src/equicordplugins/fullUserInChatbox/index.tsx +++ b/src/equicordplugins/fullUserInChatbox/index.tsx @@ -17,7 +17,7 @@ export default definePlugin({ patches: [ { - find: "UNKNOWN_ROLE_PLACEHOLDER]", + find: "colorString,background", replacement: { match: /(hidePersonalInformation.*?)return/, replace: "$1return $self.patchChatboxMention(arguments[0]);" diff --git a/src/equicordplugins/hideServers/index.tsx b/src/equicordplugins/hideServers/index.tsx index a7dfbd4a..bff5ea40 100644 --- a/src/equicordplugins/hideServers/index.tsx +++ b/src/equicordplugins/hideServers/index.tsx @@ -77,7 +77,7 @@ export default definePlugin({ find: '("guildsnav")', replacement: [ { - match: /(?<=Messages\.SERVERS,children:.{0,300}?)(\i)(\)?\.map\(\i\))/, + match: /(?<=onActivate.{0,100},children:.{0,300}?)(\i)(\)?\.map\(\i\))/, replace: "$self.useFilteredGuilds($1)$2", }, // despite my best efforts, the above doesnt trigger a rerender @@ -88,7 +88,7 @@ export default definePlugin({ ] }, { - find: "QUICKSWITCHER_PROTIP.format", + find: '"quick-switcher-".concat', replacement: { match: /(?<=renderResults\(\){)let{query/, replace: "this.props.results = $self.filteredGuildResults(this.props.results);$&", diff --git a/src/equicordplugins/homeTyping/index.tsx b/src/equicordplugins/homeTyping/index.tsx index f54ef98f..ef6ec327 100644 --- a/src/equicordplugins/homeTyping/index.tsx +++ b/src/equicordplugins/homeTyping/index.tsx @@ -26,7 +26,7 @@ export default definePlugin({ }, patches: [ { - find: ".Messages.DISCODO_DISABLED", + find: "downloadProgress,determineOwnVisibility", replacement: [ { diff --git a/src/equicordplugins/identity/index.tsx b/src/equicordplugins/identity/index.tsx index 58462594..fc273aa4 100644 --- a/src/equicordplugins/identity/index.tsx +++ b/src/equicordplugins/identity/index.tsx @@ -140,7 +140,7 @@ export default definePlugin({ { find: "DefaultCustomizationSections", replacement: { - match: /(?<=USER_SETTINGS_AVATAR_DECORATION},"decoration"\),)/, + match: /(?<=sectionTitle:.{0,50}]\)},"decoration"\),)/, replace: "$self.ResetCard()," } }, diff --git a/src/equicordplugins/ignoreTerms/index.ts b/src/equicordplugins/ignoreTerms/index.ts index dc25dcf3..80985084 100644 --- a/src/equicordplugins/ignoreTerms/index.ts +++ b/src/equicordplugins/ignoreTerms/index.ts @@ -13,7 +13,7 @@ export default definePlugin({ authors: [Devs.D3SOX], patches: [ { - find: "Messages.NEW_TERMS_TITLE", + find: "USER_AGREEMENTS,properties", replacement: { match: /function (\i)\((\i)\)\{let\{transitionState:(\i)\}=(\i)/g, replace: "function $1($2){return $self.closeModal($2);let{transitionState:$3}=$4" diff --git a/src/equicordplugins/keywordNotify/index.tsx b/src/equicordplugins/keywordNotify/index.tsx index bf4cc2a3..54d02148 100644 --- a/src/equicordplugins/keywordNotify/index.tsx +++ b/src/equicordplugins/keywordNotify/index.tsx @@ -33,7 +33,7 @@ const recentMentionsPopoutClass = findByPropsLazy("recentMentionsPopout"); const tabClass = findByPropsLazy("inboxTitle", "tab"); const buttonClass = findByPropsLazy("size36"); const MenuHeader = findByCodeLazy(".getUnseenInviteCount())"); -const Popout = findByCodeLazy(".Messages.UNBLOCK_TO_JUMP_TITLE", "canCloseAllMessages:"); +const Popout = findByCodeLazy(".trackJump", "canCloseAllMessages:"); const createMessageRecord = findByCodeLazy(".createFromServer(", ".isBlockedForMessage", "messageReference:"); const KEYWORD_ENTRIES_KEY = "KeywordNotify_keywordEntries"; const KEYWORD_LOG_KEY = "KeywordNotify_log"; @@ -313,14 +313,14 @@ export default definePlugin({ settings, patches: [ { - find: "Messages.UNREADS_TAB_LABEL}", + find: "TODOS,className", replacement: { match: /\i\?\(0,\i\.jsxs\)\(\i\.TabBar\.Item/, replace: "$self.keywordTabBar(),$&" } }, { - find: "location:\"RecentsPopout\"})", + find: "location:\"RecentsPopout\"});", replacement: { match: /:(\i)===\i\.\i\.MENTIONS\?\(0,.+?setTab:(\i),onJump:(\i),badgeState:\i,closePopout:(\i)/, replace: ": $1 === 8 ? $self.tryKeywordMenu($2, $3, $4) $&" diff --git a/src/equicordplugins/loginWithQR/index.tsx b/src/equicordplugins/loginWithQR/index.tsx index dbadb292..b1d3d306 100644 --- a/src/equicordplugins/loginWithQR/index.tsx +++ b/src/equicordplugins/loginWithQR/index.tsx @@ -58,13 +58,13 @@ export default definePlugin({ replacement: { // Find the Edit User Profile button and insert our custom button. // A bit jank, but whatever - match: /,(.{11}\.Button,.{58}\.USER_SETTINGS_EDIT_USER_PROFILE}\))/, - replace: ",$self.insertScanQrButton($1)", + match: /,(.{0,10}\.Button.{0,50},children:.{0,50}}\))]/, + replace: ",$self.insertScanQrButton($1)]", }, }, // Insert a Scan QR Code MenuItem in the Swith Accounts popout { - find: ".SWITCH_ACCOUNTS_MANAGE_ACCOUNTS,", + find: 'id:"manage-accounts"', replacement: { match: /(id:"manage-accounts",.*?)}\)\)(,\i)/, replace: "$1}),$self.ScanQrMenuItem)$2" diff --git a/src/equicordplugins/messageLinkTooltip/index.tsx b/src/equicordplugins/messageLinkTooltip/index.tsx index debd6d26..b5f152cb 100644 --- a/src/equicordplugins/messageLinkTooltip/index.tsx +++ b/src/equicordplugins/messageLinkTooltip/index.tsx @@ -101,7 +101,7 @@ export default definePlugin({ predicate: () => settings.store.onLink, }, { - find: "Messages.REPLY_QUOTE_MESSAGE_NOT_LOADED", + find: ".NOT_LOADED:", replacement: { // Should match two places match: /(\i\.Clickable),\{/g, @@ -110,7 +110,7 @@ export default definePlugin({ predicate: () => settings.store.onReply, }, { - find: "Messages.MESSAGE_FORWARDED}", + find: "TEXT_LOW_CONTRAST})]", replacement: { match: /(\i\.Clickable),\{/, replace: "$self.ForwardTooltip,{Component:$1,vcProps:arguments[0]," diff --git a/src/equicordplugins/moreStickers/index.tsx b/src/equicordplugins/moreStickers/index.tsx index bcd56fbe..0d7094c0 100644 --- a/src/equicordplugins/moreStickers/index.tsx +++ b/src/equicordplugins/moreStickers/index.tsx @@ -64,11 +64,11 @@ export default definePlugin({ } }, { - find: ".Messages.EXPRESSION_PICKER_GIF", + find: "GIF,children", replacement: { - match: /role:"tablist",.+?\.Messages\.EXPRESSION_PICKER_CATEGORIES_A11Y_LABEL,children:(\[.*?\)\]}\)}\):null,)(.*?closePopout:\w.*?:null)/s, + match: /role:"tablist","aria-label":.{0,50},children:(\[.*?\)\]}\)}\):null,)(.*?closePopout:\w.*?:null)/s, replace: m => { - const stickerTabRegex = /(\w+?)\?(\([^()]+?\))\((.{1,2}),{.{0,128},isActive:(.{1,2})===.{1,150},children:(.{1,10}Messages.EXPRESSION_PICKER_STICKER).*?:null/s; + const stickerTabRegex = /(\w+?)\?(\([^()]+?\))\((.{1,2}),{.{0,128},isActive:(.{1,2})===.{1,150},children:(.{1,50}]\)).*?:null/s; const res = m.replace(stickerTabRegex, (_m, canUseStickers, jsx, tabHeaderComp, currentTab, stickerText) => { const isActive = `${currentTab}==="stickers+"`; return ( diff --git a/src/equicordplugins/noAppsAllowed/index.tsx b/src/equicordplugins/noAppsAllowed/index.tsx index a31bf239..a435e637 100644 --- a/src/equicordplugins/noAppsAllowed/index.tsx +++ b/src/equicordplugins/noAppsAllowed/index.tsx @@ -14,10 +14,10 @@ export default definePlugin({ patches: [ { - find: ",APP_TAG:\"", + find: "BOT:default:", replacement: { - match: /APP_TAG:".*?"/, - replace: "APP_TAG:\"BOT\"" + match: /(default:\i)=.{0,30}\)/, + replace: "$1=\"BOT\"" } } ], diff --git a/src/equicordplugins/pinIcon/index.tsx b/src/equicordplugins/pinIcon/index.tsx index d9e58067..1bc5a04a 100644 --- a/src/equicordplugins/pinIcon/index.tsx +++ b/src/equicordplugins/pinIcon/index.tsx @@ -27,9 +27,9 @@ export default definePlugin({ authors: [EquicordDevs.iamme], patches: [ { - find: "Messages.MESSAGE_EDITED,", + find: "editedTimestamp,isEdited", replacement: { - match: /Messages\.MESSAGE_EDITED,(?:[^}]*[}]){3}\)/, + match: /editedTimestamp,isEdited(?:[^}]*[}]){3}\)/, replace: "$&,$self.PinnedIcon(arguments[0].message)" } } diff --git a/src/equicordplugins/showBadgesInChat/index.tsx b/src/equicordplugins/showBadgesInChat/index.tsx index dbc0c116..beaac0de 100644 --- a/src/equicordplugins/showBadgesInChat/index.tsx +++ b/src/equicordplugins/showBadgesInChat/index.tsx @@ -11,7 +11,7 @@ import definePlugin from "@utils/types"; import { findByPropsLazy, findComponentByCodeLazy } from "@webpack"; import badges from "plugins/_api/badges"; const roleIconClassName = findByPropsLazy("roleIcon", "separator").roleIcon; -const RoleIconComponent = findComponentByCodeLazy(".Messages.ROLE_ICON_ALT_TEXT"); +const RoleIconComponent = findComponentByCodeLazy(".roleIcon", ".clickable"); import "./styles.css"; import { User } from "discord-types/general"; diff --git a/src/equicordplugins/sidebarChat/index.tsx b/src/equicordplugins/sidebarChat/index.tsx index daf9cc73..4302cefd 100644 --- a/src/equicordplugins/sidebarChat/index.tsx +++ b/src/equicordplugins/sidebarChat/index.tsx @@ -34,7 +34,7 @@ const { HeaderBar, HeaderBarIcon } = mapMangledModuleLazy(".themedMobile]:", { }); const Chat = findComponentByCodeLazy("filterAfterTimestamp:", "chatInputType"); const Resize = findComponentByCodeLazy("sidebarType:", "homeSidebarWidth"); -const ChannelHeader = findComponentByCodeLazy(".Messages.HUB_DIRECTORY_CHANNEL_TITLE.format({"); +const ChannelHeader = findComponentByCodeLazy(".GUILD_DIRECTORY", ".HUB"); const ChatInputTypes = findByPropsLazy("FORM", "NORMAL"); const Sidebars = findByPropsLazy("ThreadSidebar", "MessageRequestSidebar"); diff --git a/src/equicordplugins/statusPresets/index.tsx b/src/equicordplugins/statusPresets/index.tsx index 6761caa3..7506ca16 100644 --- a/src/equicordplugins/statusPresets/index.tsx +++ b/src/equicordplugins/statusPresets/index.tsx @@ -131,14 +131,14 @@ export default definePlugin({ dependencies: ["UserSettingsAPI"], patches: [ { - find: "Messages.CUSTOM_STATUS_SET_CUSTOM_STATUS}", + find: "analyticsLocation,children", replacement: { - match: /\.ModalFooter,.{0,70}\.Messages\.SAVE\}\)/, + match: /\.ModalFooter,.{0,70}\.handleSubmit.{0,50}\}\)/, replace: "$&,$self.renderRememberButton(this.state)" } }, { - find: /"aria-label":.{0,3}\.Messages.STATUS_MENU_LABEL/, + find: /statusPickerModalMenu,"aria-label":.{0,1}\..{0,50}\)/, replacement: { match: /!\i&&(.{0,15}\i\.Fragment.{0,55}null==(\i).{0,200}customEmojiPlaceholder\}\),onClick:([^}]+}))/, replace: "$self.render($2, $3),false&&$1" diff --git a/src/equicordplugins/whitelistedEmojis/index.tsx b/src/equicordplugins/whitelistedEmojis/index.tsx index 5354642a..75d489da 100644 --- a/src/equicordplugins/whitelistedEmojis/index.tsx +++ b/src/equicordplugins/whitelistedEmojis/index.tsx @@ -601,7 +601,7 @@ export default definePlugin({ authors: [EquicordDevs.creations], patches: [ { - find: ".Messages.EMOJI_MATCHING", + find: "null,titleWithoutQuery", replacement: { match: /renderResults\((\i)\){/, replace: "$&$1.results.emojis=$self.filterEmojis($1);if($1.results.emojis.length===0)return;" diff --git a/src/equicordplugins/youtubeDescription/index.tsx b/src/equicordplugins/youtubeDescription/index.tsx index 1d93d070..59f5b823 100644 --- a/src/equicordplugins/youtubeDescription/index.tsx +++ b/src/equicordplugins/youtubeDescription/index.tsx @@ -18,7 +18,7 @@ export default definePlugin({ authors: [Devs.arHSM], patches: [ { - find: ".Messages.SUPPRESS_ALL_EMBEDS", + find: "embedSuppressButton,onClick", replacement: { match: /case (\i\.\i\.VIDEO):(case \i\.\i\.\i:)*break;default:(\i)=(?:(this\.renderDescription)\(\))\}/, replace: "$2 break; case $1: $3 = $self.ToggleableDescriptionWrapper({ embed: this.props.embed, original: $4.bind(this) }); break; default: $3 = $4() }"