diff --git a/src/plugins/consoleShortcuts/index.ts b/src/plugins/consoleShortcuts/index.ts index c163dd649..dd1e5238d 100644 --- a/src/plugins/consoleShortcuts/index.ts +++ b/src/plugins/consoleShortcuts/index.ts @@ -247,11 +247,17 @@ export default definePlugin({ patches: [ { - find: 'this,"_changeCallbacks",', - replacement: { - match: /\i\(this,"_changeCallbacks",/, - replace: "Reflect.defineProperty(this,Symbol.toStringTag,{value:this.getName(),configurable:!0,writable:!0,enumerable:!1}),$&" - } + find: "&&this.initializeIfNeeded()", + replacement: [ + { + match: /\i\(this,"_changeCallbacks",/, + replace: "Reflect.defineProperty(this,Symbol.toStringTag,{value:this.getName(),configurable:!0,writable:!0,enumerable:!1}),$&" + }, + { + match: /\i&&this\.initializeIfNeeded\(\)/, + replace: "$&,Reflect.defineProperty(this,Symbol.toStringTag,{value:this.getName(),configurable:!0,writable:!0,enumerable:!1})" + } + ] } ], diff --git a/src/plugins/customRPC/index.tsx b/src/plugins/customRPC/index.tsx index 8e3328e80..d41c904d0 100644 --- a/src/plugins/customRPC/index.tsx +++ b/src/plugins/customRPC/index.tsx @@ -225,7 +225,7 @@ export default definePlugin({ // Discord hides buttons on your own Rich Presence for some reason. This patch disables that behaviour patches: [ { - find: ".buttons.length)>=1", + find: ".USER_PROFILE_ACTIVITY_BUTTONS),", replacement: { match: /.getId\(\)===\i.id/, replace: "$& && false" diff --git a/src/plugins/fakeNitro/index.tsx b/src/plugins/fakeNitro/index.tsx index ac9d5b91a..13a5b5e82 100644 --- a/src/plugins/fakeNitro/index.tsx +++ b/src/plugins/fakeNitro/index.tsx @@ -299,7 +299,7 @@ export default definePlugin({ ] }, { - find: "}renderEmbeds(", + find: "}renderStickersAccessories(", replacement: [ { // Call our function to decide whether the embed should be ignored or not diff --git a/src/plugins/imageZoom/index.tsx b/src/plugins/imageZoom/index.tsx index 061407411..4bdfe4378 100644 --- a/src/plugins/imageZoom/index.tsx +++ b/src/plugins/imageZoom/index.tsx @@ -163,7 +163,7 @@ export default definePlugin({ patches: [ { - find: ".renderLinkComponent)?", + find: "disableArrowKeySeek:!0", replacement: [ { match: /useFullWidth:!0,shouldLink:/, diff --git a/src/plugins/messageLogger/index.tsx b/src/plugins/messageLogger/index.tsx index 4d765e9e6..ef32ad514 100644 --- a/src/plugins/messageLogger/index.tsx +++ b/src/plugins/messageLogger/index.tsx @@ -408,7 +408,7 @@ export default definePlugin({ { // Updated message transformer(?) - find: "THREAD_STARTER_MESSAGE?null==", + find: ".PREMIUM_REFERRAL&&(", replacement: [ { // Pass through editHistory & deleted & original attachments to the "edited message" transformer diff --git a/src/plugins/pinDms/index.tsx b/src/plugins/pinDms/index.tsx index b3aaa528e..71b863eb1 100644 --- a/src/plugins/pinDms/index.tsx +++ b/src/plugins/pinDms/index.tsx @@ -72,7 +72,7 @@ export default definePlugin({ patches: [ { - find: '"private-channels-".concat(', + find: '"dm-quick-launcher"===', replacement: [ { // Filter out pinned channels from the private channel list @@ -87,15 +87,15 @@ export default definePlugin({ // Rendering { - match: /"renderRow",(\i)=>{(?<="renderDM",.+?(\i\.\i),\{channel:.+?)/, + match: /renderRow(?:",|=)(\i)=>{(?<=renderDM(?:",|=).+?(\i\.\i),\{channel:.+?)/, replace: "$&if($self.isChannelIndex($1.section, $1.row))return $self.renderChannel($1.section,$1.row,$2)();" }, { - match: /"renderSection",(\i)=>{/, + match: /renderSection(?:",|=)(\i)=>{/, replace: "$&if($self.isCategoryIndex($1.section))return $self.renderCategory($1);" }, { - match: /"renderSection".{0,300}?"span",{/, + match: /renderSection(?:",|=).{0,300}?"span",{/, replace: "$&...$self.makeSpanProps()," }, @@ -105,7 +105,7 @@ export default definePlugin({ replace: "$1($2-$self.categoryLen())" }, { - match: /"getRowHeight",\((\i),(\i)\)=>{/, + match: /getRowHeight(?:",|=)\((\i),(\i)\)=>{/, replace: "$&if($self.isChannelHidden($1,$2))return 0;" }, diff --git a/src/plugins/showHiddenThings/index.ts b/src/plugins/showHiddenThings/index.ts index b788a8bd1..82ff7a77c 100644 --- a/src/plugins/showHiddenThings/index.ts +++ b/src/plugins/showHiddenThings/index.ts @@ -52,7 +52,7 @@ export default definePlugin({ }, }, { - find: "INVITES_DISABLED))||", + find: /\.INVITES_DISABLED\)(?:\))?\|\|/, predicate: () => settings.store.showInvitesPaused, replacement: { match: /\i\.\i\.can\(\i\.\i.MANAGE_GUILD,\i\)/, diff --git a/src/plugins/spotifyCrack/index.ts b/src/plugins/spotifyCrack/index.ts index 37504be2e..505e53a12 100644 --- a/src/plugins/spotifyCrack/index.ts +++ b/src/plugins/spotifyCrack/index.ts @@ -51,7 +51,7 @@ export default definePlugin({ }, }, { - find: '"displayName","SpotifyStore")', + find: "}getPlayableComputerDevices(){", replacement: [ { predicate: () => settings.store.noSpotifyAutoPause, diff --git a/src/plugins/usrbg/index.tsx b/src/plugins/usrbg/index.tsx index 86f122c8e..36efe355e 100644 --- a/src/plugins/usrbg/index.tsx +++ b/src/plugins/usrbg/index.tsx @@ -54,9 +54,9 @@ export default definePlugin({ settings, patches: [ { - find: '.banner)==null?"COMPLETE"', + find: ':"SHOULD_LOAD");', replacement: { - match: /(?<=void 0:)\i.getPreviewBanner\(\i,\i,\i\)/, + match: /\i(?:\?)?.getPreviewBanner\(\i,\i,\i\)(?=.{0,100}"COMPLETE")/, replace: "$self.patchBannerUrl(arguments[0])||$&" }