Fix more patches

This commit is contained in:
Nuckyz 2024-11-03 13:43:13 -03:00
parent 40b948b626
commit f213045338
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9
43 changed files with 66 additions and 66 deletions

View file

@ -32,7 +32,7 @@ export default definePlugin({
}
},
{
find: "#{intl::SERVERS},children",
find: "#{intl::SERVERS}),children",
replacement: {
match: /(?<=#{intl::SERVERS}\),children:)\i\.map\(\i\)/,
replace: "Vencord.Api.ServerList.renderAll(Vencord.Api.ServerList.ServerListRenderPosition.In).concat($&)"

View file

@ -41,7 +41,7 @@ export default definePlugin({
},
{
// Status emojis
find: ".Messages.GUILD_OWNER,",
find: "#{intl::GUILD_OWNER}",
replacement: {
match: /(?<=\.activityEmoji,.+?animate:)\i/,
replace: "!0"

View file

@ -86,9 +86,9 @@ export default definePlugin({
}
},
{
find: ".Messages.ATTACHMENT_UTILITIES_SPOILER",
find: "#{intl::ATTACHMENT_UTILITIES_SPOILER}",
replacement: {
match: /(?<=children:\[)(?=.{10,80}tooltip:.{0,100}\i\.\i\.Messages\.ATTACHMENT_UTILITIES_SPOILER)/,
match: /(?<=children:\[)(?=.{10,80}tooltip:.{0,100}#{intl::ATTACHMENT_UTILITIES_SPOILER})/,
replace: "arguments[0].canEdit!==false?$self.renderIcon(arguments[0]):null,"
},
},

View file

@ -36,7 +36,7 @@ export default definePlugin({
settings,
patches: [
{
find: "BAN_CONFIRM_TITLE.",
find: "#{intl::BAN_CONFIRM_TITLE}",
replacement: {
match: /src:\i\("?\d+"?\)/g,
replace: "src:$self.source"

View file

@ -34,9 +34,9 @@ export default definePlugin({
},
},
{
find: ".Messages.GIF,",
find: "#{intl::GIF}",
replacement: {
match: /alt:(\i)=(\i\.\i\.Messages\.GIF)(?=,[^}]*\}=(\i))/,
match: /alt:(\i)=(\i\.\i\.string\(\i\.\i#{intl::GIF}\))(?=,[^}]*\}=(\i))/,
replace:
// rename prop so we can always use default value
"alt_$$:$1=$self.altify($3)||$2",

View file

@ -63,9 +63,9 @@ export default definePlugin({
}
},
{
find: "Messages.NOTE_PLACEHOLDER",
find: "#{intl::NOTE_PLACEHOLDER}",
replacement: {
match: /\.NOTE_PLACEHOLDER,/,
match: /#{intl::NOTE_PLACEHOLDER}\),/,
replace: "$&spellCheck:!$self.noSpellCheck,"
}
}

View file

@ -60,7 +60,7 @@ export default definePlugin({
patches: [
{
find: "Messages.AUTH_SESSIONS_SESSION_LOG_OUT",
find: "#{intl::AUTH_SESSIONS_SESSION_LOG_OUT}",
replacement: [
// Replace children with a single label with state
{

View file

@ -111,7 +111,7 @@ export default definePlugin({
predicate: () => settings.store.disableFade
},
{ // Load menu TOC eagerly
find: "Messages.USER_SETTINGS_WITH_BUILD_OVERRIDE.format",
find: "#{intl::USER_SETTINGS_WITH_BUILD_OVERRIDE}",
replacement: {
match: /(\i)\(this,"handleOpenSettingsContextMenu",.{0,100}?null!=\i&&.{0,100}?(await Promise\.all[^};]*?\)\)).*?,(?=\1\(this)/,
replace: "$&(async ()=>$2)(),"
@ -119,7 +119,7 @@ export default definePlugin({
predicate: () => settings.store.eagerLoad
},
{ // Settings cog context menu
find: "Messages.USER_SETTINGS_ACTIONS_MENU_LABEL",
find: "#{intl::USER_SETTINGS_ACTIONS_MENU_LABEL}",
replacement: [
{
match: /(EXPERIMENTS:.+?)(\(0,\i.\i\)\(\))(?=\.filter\(\i=>\{let\{section:\i\}=)/,

View file

@ -25,7 +25,7 @@ export default definePlugin({
authors: [Devs.Obsidian, Devs.Nuckyz],
patches: [
{
find: ".Messages.PREVIEW_BYTES_LEFT.format(",
find: "#{intl::PREVIEW_BYTES_LEFT}",
replacement: {
match: /\.footerGap.+?url:\i,fileName:\i,fileSize:\i}\),(?<=fileContents:(\i),bytesLeft:(\i).+?)/g,
replace: "$&$self.addCopyButton({fileContents:$1,bytesLeft:$2}),"

View file

@ -67,7 +67,7 @@ export default definePlugin({
patches: [
{
find: ".Messages.ERRORS_UNEXPECTED_CRASH",
find: "#{intl:;ERRORS_UNEXPECTED_CRASH}",
replacement: {
match: /this\.setState\((.+?)\)/,
replace: "$self.handleCrash(this,$1);"

View file

@ -27,7 +27,7 @@ export default definePlugin({
authors: [Devs.Nuckyz],
patches: [
{
find: ".Messages.BOT_CALL_IDLE_DISCONNECT",
find: "#{intl::BOT_CALL_IDLE_DISCONNECT}",
replacement: {
match: /,?(?=\i\(this,"idleTimeout",new \i\.\i\))/,
replace: ";return;"

View file

@ -285,7 +285,7 @@ export default definePlugin({
},
// Remove boost requirements to stream with high quality
{
find: "STREAM_FPS_OPTION.format",
find: "#{intl::STREAM_FPS_OPTION}",
predicate: () => settings.store.enableStreamQualityBypass,
replacement: {
match: /guildPremiumTier:\i\.\i\.TIER_\d,?/g,
@ -356,7 +356,7 @@ export default definePlugin({
]
},
{
find: ".Messages.STICKER_POPOUT_UNJOINED_PRIVATE_GUILD_DESCRIPTION.format",
find: "#{intl::STICKER_POPOUT_UNJOINED_PRIVATE_GUILD_DESCRIPTION}",
predicate: () => settings.store.transformStickers,
replacement: [
{
@ -381,7 +381,7 @@ export default definePlugin({
}
},
{
find: ".Messages.EMOJI_POPOUT_UNJOINED_DISCOVERABLE_GUILD_DESCRIPTION",
find: "#{intl::EMOJI_POPOUT_UNJOINED_DISCOVERABLE_GUILD_DESCRIPTION}",
predicate: () => settings.store.transformEmojis,
replacement: {
// Add the fake nitro emoji notice

View file

@ -126,7 +126,7 @@ export default definePlugin({
}
},
{
find: ".USER_SETTINGS_RESET_PROFILE_THEME",
find: "#{intl::USER_SETTINGS_RESET_PROFILE_THEME}",
replacement: {
match: /RESET_PROFILE_THEME}\)(?<=color:(\i),.{0,500}?color:(\i),.{0,500}?)/,
replace: "$&,$self.addCopy3y3Button({primary:$1,accent:$2})"

View file

@ -27,7 +27,7 @@ export default definePlugin({
authors: [Devs.D3SOX, Devs.Nickyux],
patches: [
{
find: ".Messages.GUILD_OWNER,",
find: "#{intl::GUILD_OWNER}",
replacement: {
match: /,isOwner:(\i),/,
replace: ",_isOwner:$1=$self.isGuildOwner(e),"

View file

@ -26,7 +26,7 @@ export default definePlugin({
{
find: ".PANEL}),nicknameIcons",
replacement: {
match: /#{intl::USER_PROFILE_MEMBER_SINCE},.{0,100}userId:(\i\.id)}\)}\)/,
match: /#{intl::USER_PROFILE_MEMBER_SINCE}\),.{0,100}userId:(\i\.id)}\)}\)/,
replace: "$&,$self.FriendsSinceComponent({userId:$1,isSidebar:true})"
}
},
@ -34,7 +34,7 @@ export default definePlugin({
{
find: "action:\"PRESS_APP_CONNECTION\"",
replacement: {
match: /#{intl::USER_PROFILE_MEMBER_SINCE},.{0,100}userId:(\i\.id),.{0,100}}\)}\),/,
match: /#{intl::USER_PROFILE_MEMBER_SINCE}\),.{0,100}userId:(\i\.id),.{0,100}}\)}\),/,
replace: "$&,$self.FriendsSinceComponent({userId:$1,isSidebar:false}),"
}
}

View file

@ -92,7 +92,7 @@ export default definePlugin({
patches: [
{
find: ".Messages.ACCOUNT_SPEAKING_WHILE_MUTED",
find: "#{intl::ACCOUNT_SPEAKING_WHILE_MUTED}",
replacement: {
match: /this\.renderNameZone\(\).+?children:\[/,
replace: "$&$self.GameActivityToggleButton(),"

View file

@ -166,7 +166,7 @@ export default definePlugin({
patches: [
{
find: "Messages.WELCOME_CTA_LABEL",
find: "#{intl::WELCOME_CTA_LABEL}",
replacement: {
match: /innerClassName:\i\.welcomeCTAButton,(?<={channel:\i,message:\i}=(\i).{0,400}?)/,
replace: "$&onContextMenu:(vcEvent)=>$self.pickSticker(vcEvent, $1),"

View file

@ -260,9 +260,9 @@ export default definePlugin({
}
},
{
find: ".Messages.SETTINGS_GAMES_TOGGLE_OVERLAY",
find: "#{intl::SETTINGS_GAMES_TOGGLE_OVERLAY}",
replacement: {
match: /\.Messages\.SETTINGS_GAMES_TOGGLE_OVERLAY.+?}\(\),(?<={overlay:\i,.+?=(\i),.+?)(?=!(\i))/,
match: /#{intl::SETTINGS_GAMES_TOGGLE_OVERLAY}.+?}\(\),(?<={overlay:\i,.+?=(\i),.+?)(?=!(\i))/,
replace: (m, props, nowPlaying) => `${m}$self.renderToggleGameActivityButton(${props},${nowPlaying}),`
}
},

View file

@ -32,7 +32,7 @@ export default definePlugin({
patches: [
// Counts header
{
find: ".FRIENDS_ALL_HEADER",
find: "#{intl::FRIENDS_ALL_HEADER}",
replacement: {
match: /toString\(\)\}\);case (\i\.\i)\.BLOCKED/,
replace: 'toString()});case $1.IMPLICIT:return "Implicit — "+arguments[1];case $1.BLOCKED'
@ -48,7 +48,7 @@ export default definePlugin({
},
// Sections header
{
find: ".FRIENDS_SECTION_ONLINE",
find: "#{intl::FRIENDS_SECTION_ONLINE}",
replacement: {
match: /(\(0,\i\.jsx\)\(\i\.TabBar\.Item,\{id:\i\.\i)\.BLOCKED,className:([^\s]+?)\.item,children:\i\.\i\.Messages\.BLOCKED\}\)/,
replace: "$1.IMPLICIT,className:$2.item,children:\"Implicit\"}),$&"

View file

@ -111,7 +111,7 @@ export default definePlugin({
patches: [
{
// Indicator
find: ".Messages.MESSAGE_EDITED,",
find: "#{intl::MESSAGE_EDITED}",
replacement: {
match: /let\{className:\i,message:\i[^}]*\}=(\i)/,
replace: "try {$1 && $self.INV_REGEX.test($1.message.content) ? $1.content.push($self.indicator()) : null } catch {};$&"

View file

@ -62,7 +62,7 @@ export default definePlugin({
patches: [
{
find: ".LOADING_DID_YOU_KNOW",
find: "#{intl::LOADING_DID_YOU_KNOW}",
replacement: [
{
match: /"_loadingText".+?(?=(\i)\[.{0,10}\.random)/,

View file

@ -445,7 +445,7 @@ export default definePlugin({
{
// Message content renderer
find: "Messages.MESSAGE_EDITED,\")\"",
find: "#{intl::MESSAGE_EDITED}",
replacement: [
{
// Render editHistory in the deepest div for message content
@ -497,7 +497,7 @@ export default definePlugin({
},
{
// Message group rendering
find: "Messages.NEW_MESSAGES_ESTIMATED_WITH_DATE",
find: "#{intl::NEW_MESSAGES_ESTIMATED_WITH_DATE}",
replacement: [
{
match: /(\i).type===\i\.\i\.MESSAGE_GROUP_BLOCKED\|\|/,

View file

@ -187,7 +187,7 @@ export default definePlugin({
}
},
{
find: ".DISCORD_SYSTEM_MESSAGE_BOT_TAG_TOOLTIP_OFFICIAL,",
find: "#{intl::DISCORD_SYSTEM_MESSAGE_BOT_TAG_TOOLTIP_OFFICIAL}",
replacement: [
// make the tag show the right text
{
@ -217,7 +217,7 @@ export default definePlugin({
},
// in the member list
{
find: ".Messages.GUILD_OWNER,",
find: "#{intl::GUILD_OWNER}",
replacement: {
match: /(?<type>\i)=\(null==.{0,100}\.BOT;return null!=(?<user>\i)&&\i\.bot/,
replace: "$<type> = $self.getTag({user: $<user>, channel: arguments[0].channel, origType: $<user>.bot ? 0 : null, location: 'not-chat' }); return typeof $<type> === 'number'"
@ -232,7 +232,7 @@ export default definePlugin({
}
},
{
find: ".Messages.USER_PROFILE_PRONOUNS",
find: "#{ìntl::USER_PROFILE_PRONOUNS}",
replacement: {
match: /(?=,hideBotTag:!0)/,
replace: ",moreTags_channelId:arguments[0].moreTags_channelId"

View file

@ -37,7 +37,7 @@ export default definePlugin({
authors: [Devs.rushii, Devs.Samu],
patches: [
{
find: "Messages.BLOCKED_MESSAGES_HIDE",
find: "#{intl::BLOCKED_MESSAGES_HIDE}",
replacement: [
{
match: /let\{[^}]*collapsedReason[^}]*\}/,

View file

@ -25,7 +25,7 @@ export default definePlugin({
authors: [Devs.nekohaxx],
patches: [
{
find: "Messages.ONBOARDING_COVER_WELCOME_SUBTITLE",
find: "#{intl::ONBOARDING_COVER_WELCOME_SUBTITLE}",
replacement: {
match: "3e3",
replace: "0"

View file

@ -13,7 +13,7 @@ export default definePlugin({
authors: [Devs.bb010g],
patches: [
{
find: ".Messages.COPY_MESSAGE_LINK,",
find: "#{intl::COPY_MESSAGE_LINK}",
replacement: {
match: /\.concat\(location\.host\)/,
replace: ".concat($self.normalizeHost(location.host))",

View file

@ -43,15 +43,15 @@ export default definePlugin({
patches: [
{
find: "Messages.GUILD_INVITE_DISABLE_ACTION_SHEET_DESCRIPTION",
find: "#{intl::GUILD_INVITE_DISABLE_ACTION_SHEET_DESCRIPTION}",
group: true,
replacement: [
{
match: /children:\i\.\i\.\i\.GUILD_INVITE_DISABLE_ACTION_SHEET_DESCRIPTION/,
match: /children:\i\.\i\.string\(\i\.\i#{intl::GUILD_INVITE_DISABLE_ACTION_SHEET_DESCRIPTION}\)/,
replace: "children: $self.renderInvitesLabel({guildId:arguments[0].guildId,setChecked})",
},
{
match: /\.INVITES_DISABLED\)(?=.+?\.Messages\.INVITES_PERMANENTLY_DISABLED_TIP.+?checked:(\i)).+?\[\1,(\i)\]=\i.useState\(\i\)/,
match: /\.INVITES_DISABLED\)(?=.+?#{intl::INVITES_PERMANENTLY_DISABLED_TIP}.+?checked:(\i)).+?\[\1,(\i)\]=\i.useState\(\i\)/,
replace: "$&,setChecked=$2"
}
]

View file

@ -32,7 +32,7 @@ export default definePlugin({
patches: [
// Permission lockout, just set the check to true
{
find: ".STAGE_CHANNEL_CANNOT_OVERWRITE_PERMISSION",
find: "#{intl::STAGE_CHANNEL_CANNOT_OVERWRITE_PERMISSION}",
replacement: [
{
match: /case"DENY":.{0,50}if\((?=\i\.\i\.can)/,
@ -43,7 +43,7 @@ export default definePlugin({
},
// Onboarding, same thing but we need to prevent the check
{
find: ".ONBOARDING_CHANNEL_THRESHOLD_WARNING",
find: "#{intl::ONBOARDING_CHANNEL_THRESHOLD_WARNING}",
replacement: [
{
match: /{(\i:function\(\){return \i},?){2}}/,

View file

@ -67,7 +67,7 @@ export default definePlugin({
patches: [
{
find: ".REPLY_QUOTE_MESSAGE_BLOCKED",
find: "#[intl::REPLY_QUOTE_MESSAGE_BLOCKED}",
replacement: {
match: /\.onClickReply,.+?}\),(?=\i,\i,\i\])/,
replace: "$&$self.ReplyTimestamp(arguments[0]),"

View file

@ -108,7 +108,7 @@ export default definePlugin({
patches: [
{
find: ".Messages.MESSAGE_ACTIONS_MENU_LABEL,shouldHideMediaOptions",
find: "#{intl::MESSAGE_ACTIONS_MENU_LABEL}",
replacement: {
match: /favoriteableType:\i,(?<=(\i)\.getAttribute\("data-type"\).+?)/,
replace: (m, target) => `${m}reverseImageSearchType:${target}.getAttribute("data-role"),`

View file

@ -104,7 +104,7 @@ export default definePlugin({
predicate: () => settings.store.memberList,
},
{
find: ".Messages.THREAD_BROWSER_PRIVATE",
find: "#{intl::THREAD_BROWSER_PRIVATE}",
replacement: [
{
match: /children:\[\i," — ",\i\]/,
@ -132,7 +132,7 @@ export default definePlugin({
predicate: () => settings.store.reactorsList,
},
{
find: '.Messages.MESSAGE_EDITED,")"',
find: "#{intl::MESSAGE_EDITED}",
replacement: {
match: /(?<=isUnsupported\]:(\i)\.isUnsupported\}\),)(?=children:\[)/,
replace: "style:{color:$self.useMessageColor($1)},"

View file

@ -46,7 +46,7 @@ export default definePlugin({
}
},
{
find: ".PREVIEW_NUM_LINES",
find: "#{intl::PREVIEW_NUM_LINES}",
replacement: {
match: /(?<=function \i\((\i)\)\{)(?=let\{text:\i,language:)/,
replace: "return $self.renderHighlighter({lang:$1.language,content:$1.text});"

View file

@ -26,7 +26,7 @@ export default definePlugin({
patches: [
{
find: ".Messages.MESSAGE_UTILITIES_A11Y_LABEL",
find: "#{intl::MESSAGE_UTILITIES_A11Y_LABEL}",
replacement: {
match: /isExpanded:\i&&(.+?),/,
replace: "isExpanded:$1,"

View file

@ -274,7 +274,7 @@ export default definePlugin({
}
},
{
find: ".Messages.ROLE_REQUIRED_SINGLE_USER_MESSAGE",
find: "#{intl::ROLE_REQUIRED_SINGLE_USER_MESSAGE}",
replacement: [
{
// Change the role permission check to CONNECT if the channel is locked
@ -336,7 +336,7 @@ export default definePlugin({
]
},
{
find: ".Messages.CHANNEL_CALL_CURRENT_SPEAKER.format",
find: "#{intl::CHANNEL_CALL_CURRENT_SPEAKER}",
replacement: [
{
// Remove the divider and the open chat button for the HiddenChannelLockScreen
@ -351,7 +351,7 @@ export default definePlugin({
]
},
{
find: ".Messages.EMBEDDED_ACTIVITIES_DEVELOPER_ACTIVITY_SHELF_FETCH_ERROR",
find: "#{intl::EMBEDDED_ACTIVITIES_DEVELOPER_ACTIVITY_SHELF_FETCH_ERROR}",
replacement: [
{
// Render our HiddenChannelLockScreen component instead of the main voice channel component
@ -401,7 +401,7 @@ export default definePlugin({
]
},
{
find: ".Messages.STAGE_FULL_MODERATOR_TITLE",
find: "#{intl::STAGE_FULL_MODERATOR_TITLE}",
replacement: [
{
// Remove the divider and amount of users in stage channel components for the HiddenChannelLockScreen
@ -463,7 +463,7 @@ export default definePlugin({
]
},
{
find: ".Messages.FORM_LABEL_MUTED",
find: "#{intl::FORM_LABEL_MUTED}",
replacement: {
// Make GuildChannelStore.getChannels return hidden channels
match: /(?<=getChannels\(\i)(?=\))/,

View file

@ -68,7 +68,7 @@ export default definePlugin({
},
// fixes a bug where Members page must be loaded to see highest role, why is Discord depending on MemberSafetyStore.getEnhancedMember for something that can be obtained here?
{
find: "Messages.GUILD_MEMBER_MOD_VIEW_PERMISSION_GRANTED_BY_ARIA_LABEL,allowOverflow",
find: "#{intl::GUILD_MEMBER_MOD_VIEW_PERMISSION_GRANTED_BY_ARIA_LABEL}",
predicate: () => settings.store.showModView,
replacement: {
match: /(role:)\i(?=,guildId.{0,100}role:(\i\[))/,

View file

@ -65,10 +65,10 @@ export default definePlugin({
patches: [
{
find: ".GUILD_COMMUNICATION_DISABLED_ICON_TOOLTIP_BODY",
find: "#{intl::GUILD_COMMUNICATION_DISABLED_ICON_TOOLTIP_BODY}",
replacement: [
{
match: /(\i)\.Tooltip,{(text:.{0,30}\.Messages\.GUILD_COMMUNICATION_DISABLED_ICON_TOOLTIP_BODY)/,
match: /(\i)\.Tooltip,{(text:.{0,30}#{intl::GUILD_COMMUNICATION_DISABLED_ICON_TOOLTIP_BODY}\))/,
replace: "$self.TooltipWrapper,{message:arguments[0].message,$2"
}
]

View file

@ -45,7 +45,7 @@ export default definePlugin({
replace: "}).sortBy(row => $self.wrapSort(($1), row)).value()"
}
}, {
find: ".Messages.FRIEND_REQUEST_CANCEL",
find: "#{intl::FRIEND_REQUEST_CANCEL}",
replacement: {
predicate: () => settings.store.showDates,
match: /subText:(\i)(?<=user:(\i).+?)/,

View file

@ -26,7 +26,7 @@ export default definePlugin({
description: "Adds Startup Timings to the Settings menu",
authors: [Devs.Megu],
patches: [{
find: "Messages.ACTIVITY_SETTINGS",
find: "#{intl::ACTIVITY_SETTINGS}",
replacement: {
match: /(?<=}\)([,;])(\i\.settings)\.forEach.+?(\i)\.push.+}\)}\))/,
replace: (_, commaOrSemi, settings, elements) => "" +

View file

@ -38,7 +38,7 @@ export default definePlugin({
// add --avatar-url-<resolution> css variable to avatar img elements
// popout profiles
{
find: ".LABEL_WITH_ONLINE_STATUS",
find: "#{intl::LABEL_WITH_ONLINE_STATUS}",
replacement: {
match: /src:null!=\i\?(\i).{1,50}"aria-hidden":!0/,
replace: "$&,style:$self.getAvatarStyles($1)"

View file

@ -25,7 +25,7 @@ export default definePlugin({
settings,
patches: [
{
find: ".Messages.AVATAR_UPLOAD_EDIT_MEDIA",
find: "#{intl::AVATAR_UPLOAD_EDIT_MEDIA}",
replacement: {
match: /maxValue:\d/,
replace: "maxValue:$self.settings.store.zoomMultiplier",

View file

@ -57,7 +57,7 @@ export default definePlugin({
patches: [
// User Popout, Full Size Profile, Direct Messages Side Profile
{
find: ".Messages.USER_PROFILE_LOAD_ERROR",
find: "#{intl::USER_PROFILE_LOAD_ERROR}",
replacement: {
match: /(\.fetchError.+?\?)null/,
replace: (_, rest) => `${rest}$self.VoiceChannelIndicator({userId:arguments[0]?.userId,isProfile:true})`

View file

@ -37,9 +37,9 @@ export default definePlugin({
authors: [Devs.newwares],
patches: [
{
find: "Messages.REPLY_QUOTE_MESSAGE_NOT_LOADED",
find: "#{intl::REPLY_QUOTE_MESSAGE_NOT_LOADED",
replacement: {
match: /Messages\.REPLY_QUOTE_MESSAGE_NOT_LOADED/,
match: /#{intl::REPLY_QUOTE_MESSAGE_NOT_LOADED}\)/,
replace: "$&,onMouseEnter:()=>$self.fetchReply(arguments[0])"
}
},

View file

@ -127,11 +127,11 @@ export default definePlugin({
replace: "return [true"
},
{
match: /(?<=#{intl::COPY_IMAGE_MENU_ITEM},)action:/,
match: /(?<=#{intl::COPY_IMAGE_MENU_ITEM}\),)action:/,
replace: "action:()=>$self.copyImage(arguments[0]),oldAction:"
},
{
match: /(?<=#{intl::SAVE_IMAGE_MENU_ITEM},)action:/,
match: /(?<=#{intl::SAVE_IMAGE_MENU_ITEM}\),)action:/,
replace: "action:()=>$self.saveImage(arguments[0]),oldAction:"
},
]