Fix Patches

This commit is contained in:
thororen1234 2026-06-24 00:07:53 -04:00
parent dea9b210b7
commit d74f3fb537
No known key found for this signature in database
7 changed files with 8 additions and 16 deletions

View file

@ -100,7 +100,7 @@
"typescript-transform-paths": "^3.5.6",
"zip-local": "^0.3.5"
},
"packageManager": "pnpm@11.0.9",
"packageManager": "pnpm@11.8.0",
"engines": {
"node": ">=18"
}

View file

@ -16,7 +16,7 @@ export default definePlugin({
{
find: '"view-profile"',
replacement: {
match: /(\i)=.{0,45}\(0,\i\.openUserProfileModal.{0,300}(?=return)/,
match: /\i\((\i)\)\{.{0,45}\(0,\i\.openUserProfileModal.{0,300}(?=return)/,
replace: "$&return $1();"
},
all: true

View file

@ -205,7 +205,7 @@ export default definePlugin({
// Profile banner animation effect
find: "bannerAdjustment,isHovering",
replacement: {
match: /\i=(\i)=>\{(?=.{0,50}\.useReducedMotion\))/,
match: /\i=function\((\i)\)\{(?=.{0,50}\.useReducedMotion\))/,
replace: "$&if(!$1.shopPreview)return null;"
},
predicate: () => settings.store.removeProfileEffect,

View file

@ -199,7 +199,7 @@ export default definePlugin({
{
find: "POPOUT)},children:",
replacement: {
match: /(?<=getUser\(\i\.ownerId\).{0,100})className:\i\.\i,onClick:\i=>\{\(0,\i\.\i\)\(\i,/,
match: /(?<=getUser\(\i\.ownerId\).{0,100})className:\i\.\i,onClick:function\(\i\)\{\(0,\i\.\i\)\(\i,/,
replace: "draggable:!0,onDragStart:e=>$self.onChannelDragStart(e,{id:arguments[0]?.thread?.id,guild_id:arguments[0]?.thread?.guild_id}),$&"
}
},

View file

@ -178,14 +178,6 @@ export default definePlugin({
}
]
},
// Fixes crashing with unknown gift styles
{
find: "Unexpected giftStyle",
replacement: {
match: /throw Error\(`Unexpected giftStyle \$\{(\i)\}`\);/,
replace: "console.warn(`Unexpected giftStyle $${$1}`);"
}
},
// Fix a race condition
{
find: ".completeOperation(",

View file

@ -101,9 +101,9 @@ export default definePlugin({
patches: [
{
// Detects paste events triggered by the "browser" outside of input fields.
find: "document.addEventListener(\"paste\",",
find: 'document.addEventListener("paste",',
replacement: {
match: /(?<=paste",(\i)=>{)/,
match: /(?<=getMigrationStatus\(\)\);.{0,50}\i\((\i)\)\{)/,
replace: "if($1.target.tagName===\"BUTTON\"||$self.isPastingDisabled(false)){$1.preventDefault?.();$1.stopPropagation?.();return;};"
}
},

View file

@ -52,8 +52,8 @@ export default definePlugin({
replace: "false"
},
{
match: /\(\)=>\i\.length<\i\.length/,
replace: "()=>false",
match: /return \i\.length<\i\.length/,
replace: "return false",
predicate: () => settings.store.hideArrow
}
]