From 2a4c3c119ba012e3c3357d7adcc059131b52cec8 Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Thu, 3 Apr 2025 15:55:06 -0400 Subject: [PATCH] Fix Canary Patches --- src/equicordplugins/clientSideBlock/index.tsx | 2 +- src/equicordplugins/customUserColors/index.tsx | 2 +- src/equicordplugins/messageLoggerEnhanced/index.tsx | 2 +- src/equicordplugins/moreStickers/index.tsx | 2 +- src/equicordplugins/searchFix/index.tsx | 2 +- src/equicordplugins/videoSpeed/index.tsx | 2 +- src/plugins/consoleJanitor/index.tsx | 4 ++-- src/plugins/customidle/index.ts | 2 +- src/plugins/ircColors/index.ts | 2 +- src/plugins/messageLogger/index.tsx | 2 +- src/plugins/newGuildSettings/index.tsx | 2 +- src/plugins/nsfwGateBypass/index.ts | 4 ++-- src/webpack/common/components.ts | 4 ++-- 13 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/equicordplugins/clientSideBlock/index.tsx b/src/equicordplugins/clientSideBlock/index.tsx index 837d34da..3ce827ff 100644 --- a/src/equicordplugins/clientSideBlock/index.tsx +++ b/src/equicordplugins/clientSideBlock/index.tsx @@ -179,7 +179,7 @@ export default definePlugin({ find: ".GUILD_APPLICATION_PREMIUM_SUBSCRIPTION||", replacement: [ { - match: /let \i;let\{repliedAuthor:/, + match: /let \i,\{repliedAuthor:/, replace: "if(arguments[0] != null && arguments[0].referencedMessage.message != null) { if($self.shouldHideUser(arguments[0].referencedMessage.message.author.id, arguments[0].baseMessage.messageReference.channel_id)) { return $self.hiddenReplyComponent(); } }$&" } ] diff --git a/src/equicordplugins/customUserColors/index.tsx b/src/equicordplugins/customUserColors/index.tsx index 57134557..9e825152 100644 --- a/src/equicordplugins/customUserColors/index.tsx +++ b/src/equicordplugins/customUserColors/index.tsx @@ -83,7 +83,7 @@ export default definePlugin({ // this also affects name headers in chats outside of servers find: '="SYSTEM_TAG"', replacement: { - match: /(?<=\i.gradientClassName]\),style:.{0,80}:void 0,)/, + match: /(?<=\i.gradientClassName]\),style:.{0,80}:void 0\}\)\(\),)/, replace: "style:{color:$self.colorIfServer(arguments[0])}," }, predicate: () => !Settings.plugins.IrcColors.enabled diff --git a/src/equicordplugins/messageLoggerEnhanced/index.tsx b/src/equicordplugins/messageLoggerEnhanced/index.tsx index d22f04d2..bbf4df3a 100644 --- a/src/equicordplugins/messageLoggerEnhanced/index.tsx +++ b/src/equicordplugins/messageLoggerEnhanced/index.tsx @@ -254,7 +254,7 @@ export default definePlugin({ ] }, { - find: "THREAD_STARTER_MESSAGE?null===", + find: "THREAD_STARTER_MESSAGE?null==", replacement: { match: /deleted:\i\.deleted, editHistory:\i\.editHistory,/, replace: "deleted:$self.getDeleted(...arguments), editHistory:$self.getEdited(...arguments)," diff --git a/src/equicordplugins/moreStickers/index.tsx b/src/equicordplugins/moreStickers/index.tsx index 6ee8628d..2388329f 100644 --- a/src/equicordplugins/moreStickers/index.tsx +++ b/src/equicordplugins/moreStickers/index.tsx @@ -56,7 +56,7 @@ export default definePlugin({ { find: ".gifts)", replacement: { - match: /,.{0,5}\(null===\(\w=\w\.stickers\)\|\|void 0.*?(\w)\.push\((\(0,\w\.jsx\))\((.+?),{disabled:\w,type:(\w)},"sticker"\)\)\)/, + match: /,.{0,5}\(null==\(\i=\i\.stickers\)\?void 0.*?(\i)\.push\((\(0,\w\.jsx\))\((.+?),{disabled:\i,type:(\i)},"sticker"\)\)\)/, replace: (m, _, jsx, compo, type) => { const c = "arguments[0].type"; return `${m},${c}?.submit?.button&&${_}.push(${jsx}(${compo},{disabled:!${c}?.submit?.button,type:${type},stickersType:"stickers+"},"stickers+"))`; diff --git a/src/equicordplugins/searchFix/index.tsx b/src/equicordplugins/searchFix/index.tsx index cb7f9f5e..5234537e 100644 --- a/src/equicordplugins/searchFix/index.tsx +++ b/src/equicordplugins/searchFix/index.tsx @@ -28,7 +28,7 @@ export default definePlugin({ { find: '"SearchStore",', replacement: { - match: /(\i)\.offset=null!==\((\i)=(\i)\.offset\)&&void 0!==(\i)\?(\i):0/i, + match: /(\i)\.offset=null!=\((\i)=(\i)\.offset\)\?(\i):0/i, replace: (_, v, v1, query, v3, v4) => `$self.main(${query}), ${v}.offset = null !== (${v1} = ${query}.offset) && void 0 !== ${v3} ? ${v4} : 0` } } diff --git a/src/equicordplugins/videoSpeed/index.tsx b/src/equicordplugins/videoSpeed/index.tsx index f066da2a..448d9ae7 100644 --- a/src/equicordplugins/videoSpeed/index.tsx +++ b/src/equicordplugins/videoSpeed/index.tsx @@ -27,7 +27,7 @@ export default definePlugin({ settings, patches: [ { - find: ".videoControls:", + find: /\.VIDEO\?\i\.videoControls:/, replacement: { match: /children:\[this\.renderPlayIcon\(\),.{0,200}\.setDurationRef}\),/, replace: "$&$self.SpeedButton()," diff --git a/src/plugins/consoleJanitor/index.tsx b/src/plugins/consoleJanitor/index.tsx index 5a3b3cd1..ab0ac9bb 100644 --- a/src/plugins/consoleJanitor/index.tsx +++ b/src/plugins/consoleJanitor/index.tsx @@ -148,14 +148,14 @@ export default definePlugin({ { find: "is not a valid locale.", replacement: { - match: /\i\.error\(""\.concat\(\i," is not a valid locale."\)\);/, + match: /void \i\.error\(""\.concat\(\i," is not a valid locale."\)\)/, replace: "" } }, { find: '"AppCrashedFatalReport: getLastCrash not supported."', replacement: { - match: /console\.log\("AppCrashedFatalReport: getLastCrash not supported\."\);/, + match: /void console\.log\("AppCrashedFatalReport: getLastCrash not supported\."\)/, replace: "" } }, diff --git a/src/plugins/customidle/index.ts b/src/plugins/customidle/index.ts index 97a77973..5ff0c81a 100644 --- a/src/plugins/customidle/index.ts +++ b/src/plugins/customidle/index.ts @@ -49,7 +49,7 @@ export default definePlugin({ replace: "$self.handleOnline()" }, { - match: /(setInterval\(\i,\.25\*)\i\.\i/, + match: /(setInterval\(\i,30\*)\i\.\i/, replace: "$1$self.getIntervalDelay()" // For web installs } ] diff --git a/src/plugins/ircColors/index.ts b/src/plugins/ircColors/index.ts index 5363acc0..237286e7 100644 --- a/src/plugins/ircColors/index.ts +++ b/src/plugins/ircColors/index.ts @@ -67,7 +67,7 @@ export default definePlugin({ { find: '="SYSTEM_TAG"', replacement: { - match: /(?<=\i.gradientClassName]\),style:.{0,80}:void 0,)/, + match: /(?<=\i.gradientClassName]\),style:.{0,80}:void 0\}\)\(\),)/, replace: "style:{color:$self.calculateNameColorForMessageContext(arguments[0])}," } }, diff --git a/src/plugins/messageLogger/index.tsx b/src/plugins/messageLogger/index.tsx index ad974126..a2d205cd 100644 --- a/src/plugins/messageLogger/index.tsx +++ b/src/plugins/messageLogger/index.tsx @@ -433,7 +433,7 @@ export default definePlugin({ { // Updated message transformer(?) - find: "THREAD_STARTER_MESSAGE?null===", + find: "THREAD_STARTER_MESSAGE?null==", replacement: [ { // Pass through editHistory & deleted & original attachments to the "edited message" transformer diff --git a/src/plugins/newGuildSettings/index.tsx b/src/plugins/newGuildSettings/index.tsx index edddb968..49fc5f05 100644 --- a/src/plugins/newGuildSettings/index.tsx +++ b/src/plugins/newGuildSettings/index.tsx @@ -134,7 +134,7 @@ export default definePlugin({ { find: ",acceptInvite(", replacement: { - match: /INVITE_ACCEPT_SUCCESS.+?,(\i)=null!==.+?;/, + match: /INVITE_ACCEPT_SUCCESS.+?,(\i)=null!=.+?;/, replace: (m, guildId) => `${m}$self.applyDefaultSettings(${guildId});` } }, diff --git a/src/plugins/nsfwGateBypass/index.ts b/src/plugins/nsfwGateBypass/index.ts index e6f3ee40..6d0cb702 100644 --- a/src/plugins/nsfwGateBypass/index.ts +++ b/src/plugins/nsfwGateBypass/index.ts @@ -28,11 +28,11 @@ export default definePlugin({ find: ".nsfwAllowed=null", replacement: [ { - match: /(?<=\.nsfwAllowed=)null!==.+?(?=[,;])/, + match: /(?<=\.nsfwAllowed=)null!=.+?(?=[,;])/, replace: "true", }, { - match: /(?<=\.ageVerificationStatus=)null!==.+?(?=[,;])/, + match: /(?<=\.ageVerificationStatus=)null!=.+?(?=[,;])/, replace: "3", // VERIFIED_ADULT } ], diff --git a/src/webpack/common/components.ts b/src/webpack/common/components.ts index d5249f2f..ebc3f383 100644 --- a/src/webpack/common/components.ts +++ b/src/webpack/common/components.ts @@ -25,7 +25,7 @@ import * as t from "./types/components"; const FormTitle = waitForComponent("FormTitle", filters.componentByCode('["defaultMargin".concat', '="h5"')); const FormText = waitForComponent("FormText", filters.componentByCode(".SELECTABLE),", ".DISABLED:")); -const FormSection = waitForComponent("FormSection", filters.componentByCode(".titleId)&&")); +const FormSection = waitForComponent("FormSection", filters.componentByCode(".titleId)?")); const FormDivider = waitForComponent("FormDivider", filters.componentByCode(".divider,", ",style:", '"div"', /\.divider,\i\),style:/)); export const Forms = { @@ -74,7 +74,7 @@ export const ScrollerNone = LazyComponent(() => createScroller(scrollerClasses.n export const ScrollerThin = LazyComponent(() => createScroller(scrollerClasses.thin, scrollerClasses.fade, scrollerClasses.customTheme)); export const ScrollerAuto = LazyComponent(() => createScroller(scrollerClasses.auto, scrollerClasses.fade, scrollerClasses.customTheme)); -const { FocusLock_ } = mapMangledModuleLazy("attachTo:null!==", { +const { FocusLock_ } = mapMangledModuleLazy("attachTo:null!=", { FocusLock_: filters.componentByCode(".containerRef") }) as { FocusLock_: t.FocusLock;