Fix Patches

This commit is contained in:
thororen1234 2026-02-04 16:30:41 -05:00
parent 1fad9a2c48
commit 71864c42a6
No known key found for this signature in database
13 changed files with 25 additions and 28 deletions

View file

@ -23,7 +23,7 @@ export default definePlugin({
{
find: "Missing channel in Channel.renderHeaderToolbar",
replacement: {
match: /(?<=renderHeaderToolbar",\(\)=>\{.{1,200}let (\i)=\[\];)/,
match: /(?<=renderHeaderToolbar"\);let (\i)=\[\];)/,
replace: "Vencord.Api.HeaderBar._addChannelToolbarButtons($1);"
}
}

View file

@ -73,10 +73,10 @@ export default definePlugin({
authors: [EquicordDevs.catcraft],
patches: [
{
find: '"_channelMessages",{})',
find: "_channelMessages={}",
predicate: () => settings.store.blockedWords !== "",
replacement: {
match: /static commit\((.{1,2})\){/g,
match: /static commit\((\i)\)\{/g,
replace: "$&$1=$self.blockMessagesWithKeywords($1);"
}
},

View file

@ -61,12 +61,12 @@ export default definePlugin({
find: '"AppView"',
replacement: [
{
match: /(\?void 0:(\i)\.channelId.{0,600})"div",{(?=className:\i\.\i)/,
match: /((\i\?.params)\?\.channelId.{0,600})"div",{(?=className:\i\.\i)/,
replace: "$1$self.render,{currentChannel:$2,",
predicate: () => settings.store.tabBarPosition === "top"
},
{
match: /(\?void 0:(\i)\.channelId.{0,300})"div",{/,
match: /((\i\?.params)\?.channelId.{0,300})"div",{/,
replace: "$1$self.render,{currentChannel:$2,",
predicate: () => settings.store.tabBarPosition === "bottom"
}
@ -74,9 +74,9 @@ export default definePlugin({
},
// intercept channel navigation to switch/create tabs
{
find: '"transitionToGuild - Transitioning to "',
find: "`transitionToGuild - Transitioning to",
replacement: {
match: /(\i\((\i),(\i),\i,\i\)\{)(.{0,25}"transitionToGuild)/,
match: /(\i\((\i),(\i),\i,\i\)\{)(.{0,25}`transitionToGuild)/,
replace: "$1$self.handleNavigation($2,$3);$4"
}
},
@ -106,7 +106,7 @@ export default definePlugin({
},
// prevent issues with the pins/inbox popouts being too tall
{
find: "renderCloseButton()",
find: "#{intl::JUMP}),onClick:",
replacement: {
match: /\i&&\((\i).maxHeight.{0,5}\)/,
replace: "$&;$1.maxHeight-=$self.containerHeight"

View file

@ -68,18 +68,18 @@ export default definePlugin({
find: "Unknown resolution:",
replacement: [
{
match: /throw Error\("Unknown resolution: ".concat\((\i)\)\)/,
match: /throw Error\(`Unknown resolution: \$\{(\i)\}`\)/,
replace: "return $1;"
},
{
match: /throw Error\("Unknown frame rate: ".concat\((\i)\)\)/,
match: /throw Error\(`Unknown frame rate: \$\{(\i)\}`\)/,
replace: "return $1;"
}
]
},
// When focused on voice channel or group chat voice call
{
find: /\i\?\i.\i.SELF_VIDEO/,
find: ".STATUS_WARNING_BACKGROUND})})",
predicate: () => settings.store.noMirroredCamera,
replacement: {
match: /mirror:\i/,
@ -115,7 +115,7 @@ export default definePlugin({
},
},
{
find: ".buttons.length)>=1",
find: ".USER_PROFILE_ACTIVITY_BUTTONS),",
predicate: () => settings.store.showYourOwnActivityButtons && !isPluginEnabled(customRPC.name),
replacement: {
match: /.getId\(\)===\i.id/,

View file

@ -93,9 +93,9 @@ export default definePlugin({
},
// Add a proxyUrl prop alongside the src prop, which is used for video thumbnails.
{
find: '"renderOverlayContent","renderLinkComponent"',
find: /disableArrowKeySeek:\i\}\)\}/,
replacement: {
match: /src:\i(?=\})/,
match: /src:\i(?=,\.\.\.\i)/,
replace: "$&,proxyUrl:this.props.src"
}
}

View file

@ -86,7 +86,7 @@ export default definePlugin({
patches: [
// User Popout
{
find: ".hasAvatarForGuild(null==",
find: /onOpenUserProfileModal:\i\}\),\i/,
replacement: {
match: /userId:\i\.id,guild:\i.{0,15}\}\).{0,100}(?=\])/,
replace: "$&,$self.ProfilePopoutComponent(arguments[0])"

View file

@ -42,12 +42,9 @@ export default definePlugin({
// Changes text md rule regex, so it stops right before hsl( | rgb(
// Without it discord will try to pass a string without those to color rule
{
find: ".defaultRules.text)",
group: true,
find: ".defaultRules.text,match",
replacement: {
// $)/)
match: /\$\)\//,
// hsl(|rgb(|$&
replace: requiredFirstCharacters.join("|") + "|$&"
}
},

View file

@ -261,7 +261,7 @@ export default definePlugin({
]
},
{
find: "THREAD_STARTER_MESSAGE?null==",
find: ".PREMIUM_REFERRAL&&(",
replacement: {
match: /deleted:\i\.deleted, editHistory:\i\.editHistory,/,
replace: "deleted:$self.getDeleted(...arguments), editHistory:$self.getEdited(...arguments),"

View file

@ -47,10 +47,10 @@ export default definePlugin({
}]
},
{
find: ".gifts)",
find: ".GIFT_PROMOTION]).",
replacement: [
{
match: /(?<=(,\(null==\(\i=\i\.stickers\)\?void 0.*?\i\.push\(\(.{0,100})\},"sticker"\)\))/,
match: /(?<=(,\i\.stickers\?\.button.{0,50}\i\.push\(\(.{0,100})\},"sticker"\)\))/,
replace: "$1,stickersType:\"stickers+\"},\"stickers+\"))"
},
]

View file

@ -134,9 +134,9 @@ export default definePlugin({
},
{
find: '(this,"hideAutocomplete"', // disable file conversion
find: ".onHideAutocomplete?", // disable file conversion
replacement: {
match: /if\(\i.length>\i\)/,
match: /(?<=getData\(\i\.type\);)if\(\i.length>\i\)/,
replace: "if(false)",
},
}

View file

@ -14,7 +14,7 @@ export default definePlugin({
dependencies: ["MessageUpdaterAPI"],
patches: [
{
find: "}renderEmbeds(",
find: "renderEmbeds(",
replacement: {
match: /(?<=renderEmbeds\(\i\){.+?embeds\.map\(\((\i),\i\)?=>{)/,
replace: "$&if($self.isTidalEmbed($1))return null;"

View file

@ -126,9 +126,9 @@ export default definePlugin({
patches: [
{
find: '"messageId","channelId"',
find: ".MASKED_LINK),",
replacement: {
match: /,children:null!=\i\?\i:\i/,
match: /,children:\i\?\?\i/,
replace: "$&,...$self.getProps(arguments[0])"
}
}

View file

@ -106,7 +106,7 @@ export default definePlugin({
]
})),
{
find: '"forum-post-action-bar-"',
find: "`forum-post-action-bar-",
replacement: [
{
match: /(?<=\);)(let \i=null,\i=\[\],\i=(\i))/,