Compare commits

..

No commits in common. "17bb28a19b09e8bbde935d60552f79363c7444cd" and "2af1cd19b56d6d7c6ce32f86f0b9b0d87647c91f" have entirely different histories.

19 changed files with 70 additions and 71 deletions

View file

@ -1,7 +1,7 @@
{ {
"name": "vencord", "name": "vencord",
"private": "true", "private": "true",
"version": "1.10.3", "version": "1.10.2",
"description": "The cutest Discord client mod", "description": "The cutest Discord client mod",
"homepage": "https://github.com/Vendicated/Vencord#readme", "homepage": "https://github.com/Vendicated/Vencord#readme",
"bugs": { "bugs": {

View file

@ -33,8 +33,8 @@ export default definePlugin({
replace: "if(Vencord.Api.Notices.currentNotice)return false;$&" replace: "if(Vencord.Api.Notices.currentNotice)return false;$&"
}, },
{ {
match: /(?<=function (\i)\(\i\){)return null!=(\i)(?=.*NOTICE_DISMISS:\1)/, match: /(?<=,NOTICE_DISMISS:function\(\i\){)return null!=(\i)/,
replace: "if($2.id==\"VencordNotice\")return($2=null,Vencord.Api.Notices.nextNotice(),true);$&" replace: "if($1.id==\"VencordNotice\")return($1=null,Vencord.Api.Notices.nextNotice(),true);$&"
} }
] ]
} }

View file

@ -71,7 +71,7 @@ export default definePlugin({
description: "Anonymise uploaded file names", description: "Anonymise uploaded file names",
patches: [ patches: [
{ {
find: "instantBatchUpload:", find: "instantBatchUpload:function",
replacement: { replacement: {
match: /uploadFiles:(\i),/, match: /uploadFiles:(\i),/,
replace: replace:

View file

@ -119,7 +119,7 @@ export default definePlugin({
{ {
find: "Slow dispatch on", find: "Slow dispatch on",
replacement: { replacement: {
match: /\i\.totalTime>\i&&\i\.verbose\("Slow dispatch on ".+?\)\);/, match: /\i\.totalTime>100&&\i\.verbose\("Slow dispatch on ".+?\)\);/,
replace: "" replace: ""
} }
}, },

View file

@ -37,8 +37,8 @@ export default definePlugin({
find: 'type:"IDLE",idle:', find: 'type:"IDLE",idle:',
replacement: [ replacement: [
{ {
match: /(?<=Date\.now\(\)-\i>)\i\.\i\|\|/, match: /(?<=Date\.now\(\)-\i>)\i\.\i/,
replace: "$self.getIdleTimeout()||" replace: "$self.getIdleTimeout()"
}, },
{ {
match: /Math\.min\((\i\.\i\.getSetting\(\)\*\i\.\i\.\i\.SECOND),\i\.\i\)/, match: /Math\.min\((\i\.\i\.getSetting\(\)\*\i\.\i\.\i\.SECOND),\i\.\i\)/,

View file

@ -54,7 +54,7 @@ export default definePlugin({
replace: "$self.DecorationGridItem=$&" replace: "$self.DecorationGridItem=$&"
}, },
{ {
match: /(?<==)\i=>{let{user:\i,avatarDecoration/, match: /(?<==)\i=>{let{user:\i,avatarDecoration.{300,600}decorationGridItemChurned/,
replace: "$self.DecorationGridDecoration=$&" replace: "$self.DecorationGridDecoration=$&"
}, },
// Remove NEW label from decor avatar decorations // Remove NEW label from decor avatar decorations

View file

@ -254,11 +254,11 @@ export default definePlugin({
}, },
// Allow stickers to be sent everywhere // Allow stickers to be sent everywhere
{ {
find: "canUseCustomStickersEverywhere:", find: "canUseCustomStickersEverywhere:function",
predicate: () => settings.store.enableStickerBypass, predicate: () => settings.store.enableStickerBypass,
replacement: { replacement: {
match: /(?<=canUseCustomStickersEverywhere:)\i/, match: /canUseCustomStickersEverywhere:function\(\i\){/,
replace: "()=>true" replace: "$&return true;"
}, },
}, },
// Make stickers always available // Make stickers always available
@ -272,15 +272,15 @@ export default definePlugin({
}, },
// Allow streaming with high quality // Allow streaming with high quality
{ {
find: "canUseHighVideoUploadQuality:", find: "canUseHighVideoUploadQuality:function",
predicate: () => settings.store.enableStreamQualityBypass, predicate: () => settings.store.enableStreamQualityBypass,
replacement: [ replacement: [
"canUseHighVideoUploadQuality", "canUseHighVideoUploadQuality",
"canStreamQuality", "canStreamQuality",
].map(func => { ].map(func => {
return { return {
match: new RegExp(`(?<=${func}:)\\i`, "g"), match: new RegExp(`${func}:function\\(\\i(?:,\\i)?\\){`, "g"),
replace: "()=>true" replace: "$&return true;"
}; };
}) })
}, },
@ -295,10 +295,10 @@ export default definePlugin({
}, },
// Allow client themes to be changeable // Allow client themes to be changeable
{ {
find: "canUseClientThemes:", find: "canUseClientThemes:function",
replacement: { replacement: {
match: /(?<=canUseClientThemes:)\i/, match: /canUseClientThemes:function\(\i\){/,
replace: "()=>true" replace: "$&return true;"
} }
}, },
{ {
@ -306,8 +306,8 @@ export default definePlugin({
replacement: [ replacement: [
{ {
// Overwrite incoming connection settings proto with our local settings // Overwrite incoming connection settings proto with our local settings
match: /function (\i)\((\i)\){(?=.*CONNECTION_OPEN:\1)/, match: /CONNECTION_OPEN:function\((\i)\){/,
replace: (m, funcName, props) => `${m}$self.handleProtoChange(${props}.userSettingsProto,${props}.user);` replace: (m, props) => `${m}$self.handleProtoChange(${props}.userSettingsProto,${props}.user);`
}, },
{ {
// Overwrite non local proto changes with our local settings // Overwrite non local proto changes with our local settings
@ -400,10 +400,10 @@ export default definePlugin({
}, },
// Allow using custom app icons // Allow using custom app icons
{ {
find: "canUsePremiumAppIcons:", find: "canUsePremiumAppIcons:function",
replacement: { replacement: {
match: /(?<=canUsePremiumAppIcons:)\i/, match: /canUsePremiumAppIcons:function\(\i\){/,
replace: "()=>true" replace: "$&return true;"
} }
}, },
// Separate patch for allowing using custom app icons // Separate patch for allowing using custom app icons
@ -424,10 +424,10 @@ export default definePlugin({
}, },
// Allow using custom notification sounds // Allow using custom notification sounds
{ {
find: "canUseCustomNotificationSounds:", find: "canUseCustomNotificationSounds:function",
replacement: { replacement: {
match: /(?<=canUseCustomNotificationSounds:)\i/, match: /canUseCustomNotificationSounds:function\(\i\){/,
replace: "()=>true" replace: "$&return true;"
} }
} }
], ],

View file

@ -244,7 +244,7 @@ export default definePlugin({
patches: [ patches: [
{ {
find: '"LocalActivityStore"', find: '="LocalActivityStore",',
replacement: [ replacement: [
{ {
match: /HANG_STATUS.+?(?=!\i\(\)\(\i,\i\)&&)(?<=(\i)\.push.+?)/, match: /HANG_STATUS.+?(?=!\i\(\)\(\i,\i\)&&)(?<=(\i)\.push.+?)/,
@ -253,7 +253,7 @@ export default definePlugin({
] ]
}, },
{ {
find: '"ActivityTrackingStore"', find: '="ActivityTrackingStore",',
replacement: { replacement: {
match: /getVisibleRunningGames\(\).+?;(?=for)(?<=(\i)=\i\.\i\.getVisibleRunningGames.+?)/, match: /getVisibleRunningGames\(\).+?;(?=for)(?<=(\i)=\i\.\i\.getVisibleRunningGames.+?)/,
replace: (m, runningGames) => `${m}${runningGames}=${runningGames}.filter(({id,name})=>$self.isActivityNotIgnored({type:0,application_id:id,name}));` replace: (m, runningGames) => `${m}${runningGames}=${runningGames}.filter(({id,name})=>$self.isActivityNotIgnored({type:0,application_id:id,name}));`

View file

@ -323,35 +323,35 @@ export default definePlugin({
replacement: [ replacement: [
{ {
// Add deleted=true to all target messages in the MESSAGE_DELETE event // Add deleted=true to all target messages in the MESSAGE_DELETE event
match: /function (\i)\((\i)\){let.+?((?:\i\.){2})getOrCreate.+?}(?=function.*MESSAGE_DELETE:\1)/, match: /MESSAGE_DELETE:function\((\i)\){let.+?((?:\i\.){2})getOrCreate.+?},/,
replace: replace:
"function $1($2){" + "MESSAGE_DELETE:function($1){" +
" var cache = $3getOrCreate($2.channelId);" + " var cache = $2getOrCreate($1.channelId);" +
" cache = $self.handleDelete(cache, $2, false);" + " cache = $self.handleDelete(cache, $1, false);" +
" $3commit(cache);" + " $2commit(cache);" +
"}" "},"
}, },
{ {
// Add deleted=true to all target messages in the MESSAGE_DELETE_BULK event // Add deleted=true to all target messages in the MESSAGE_DELETE_BULK event
match: /function (\i)\((\i)\){let.+?((?:\i\.){2})getOrCreate.+?}(?=function.*MESSAGE_DELETE_BULK:\1)/, match: /MESSAGE_DELETE_BULK:function\((\i)\){let.+?((?:\i\.){2})getOrCreate.+?},/,
replace: replace:
"function $1($2){" + "MESSAGE_DELETE_BULK:function($1){" +
" var cache = $3getOrCreate($2.channelId);" + " var cache = $2getOrCreate($1.channelId);" +
" cache = $self.handleDelete(cache, $2, true);" + " cache = $self.handleDelete(cache, $1, true);" +
" $3commit(cache);" + " $2commit(cache);" +
"}" "},"
}, },
{ {
// Add current cached content + new edit time to cached message's editHistory // Add current cached content + new edit time to cached message's editHistory
match: /(function (\i)\((\i)\).+?)\.update\((\i)(?=.*MESSAGE_UPDATE:\2)/, match: /(MESSAGE_UPDATE:function\((\i)\).+?)\.update\((\i)/,
replace: "$1" + replace: "$1" +
".update($4,m =>" + ".update($3,m =>" +
" (($3.message.flags & 64) === 64 || $self.shouldIgnore($3.message, true)) ? m :" + " (($2.message.flags & 64) === 64 || $self.shouldIgnore($2.message, true)) ? m :" +
" $3.message.edited_timestamp && $3.message.content !== m.content ?" + " $2.message.edited_timestamp && $2.message.content !== m.content ?" +
" m.set('editHistory',[...(m.editHistory || []), $self.makeEdit($3.message, m)]) :" + " m.set('editHistory',[...(m.editHistory || []), $self.makeEdit($2.message, m)]) :" +
" m" + " m" +
")" + ")" +
".update($4" ".update($3"
}, },
{ {
// fix up key (edit last message) attempting to edit a deleted message // fix up key (edit last message) attempting to edit a deleted message
@ -465,12 +465,12 @@ export default definePlugin({
find: '"ReferencedMessageStore"', find: '"ReferencedMessageStore"',
replacement: [ replacement: [
{ {
match: /MESSAGE_DELETE:\i,/, match: /MESSAGE_DELETE:function\((\i)\).+?},/,
replace: "MESSAGE_DELETE:()=>{}," replace: "MESSAGE_DELETE:function($1){},"
}, },
{ {
match: /MESSAGE_DELETE_BULK:\i,/, match: /MESSAGE_DELETE_BULK:function\((\i)\).+?},/,
replace: "MESSAGE_DELETE_BULK:()=>{}," replace: "MESSAGE_DELETE_BULK:function($1){},"
} }
] ]
}, },

View file

@ -182,8 +182,8 @@ export default definePlugin({
{ {
find: ".ORIGINAL_POSTER=", find: ".ORIGINAL_POSTER=",
replacement: { replacement: {
match: /(\i)=\{\}\)\);(?=let \i=100)/, match: /\((\i)=\{\}\)\)\[(\i)\.BOT/,
replace: "$1=$self.getTagTypes()));" replace: "($1=$self.getTagTypes()))[$2.BOT"
} }
}, },
{ {
@ -249,8 +249,8 @@ export default definePlugin({
match: /user:\i,nick:\i,/, match: /user:\i,nick:\i,/,
replace: "$&moreTags_channelId," replace: "$&moreTags_channelId,"
}, { }, {
match: /,botType:(\i),botVerified:(\i),(?!discriminatorClass:)(?<=user:(\i).+?)/g, match: /,botType:(\i),(?<=user:(\i).+?)/g,
replace: ",botType:$self.getTag({user:$3,channelId:moreTags_channelId,origType:$1,location:'not-chat'}),botVerified:$2," replace: ",botType:$self.getTag({user:$2,channelId:moreTags_channelId,origType:$1,location:'not-chat'}),"
} }
] ]
}, },

View file

@ -40,15 +40,15 @@ export default definePlugin({
] ]
}, },
...[ ...[
'"MessageStore"', '="MessageStore",',
'"displayName","ReadStateStore")' '"displayName","ReadStateStore")'
].map(find => ({ ].map(find => ({
find, find,
predicate: () => Settings.plugins.NoBlockedMessages.ignoreBlockedMessages === true, predicate: () => Settings.plugins.NoBlockedMessages.ignoreBlockedMessages === true,
replacement: [ replacement: [
{ {
match: /(?<=function (\i)\((\i)\){)(?=.*MESSAGE_CREATE:\1)/, match: /(?<=MESSAGE_CREATE:function\((\i)\){)/,
replace: (_, _funcName, props) => `if($self.isBlocked(${props}.message))return;` replace: (_, props) => `if($self.isBlocked(${props}.message))return;`
} }
] ]
})) }))

View file

@ -74,10 +74,10 @@ export default definePlugin({
// This prevents the Message Requests tab from always hiding due to the previous patch (and is compatible with spam requests) // This prevents the Message Requests tab from always hiding due to the previous patch (and is compatible with spam requests)
// In short, only the red badge is hidden. Button visibility behavior isn't changed. // In short, only the red badge is hidden. Button visibility behavior isn't changed.
{ {
find: ".getSpamChannelsCount();", find: ".getSpamChannelsCount(),",
predicate: () => settings.store.hideMessageRequestsCount, predicate: () => settings.store.hideMessageRequestsCount,
replacement: { replacement: {
match: /(?<=getSpamChannelsCount\(\);return )\i\.getMessageRequestsCount\(\)/, match: /(?<=getSpamChannelsCount\(\),\i=)\i\.getMessageRequestsCount\(\)/,
replace: "$self.getRealMessageRequestCount()" replace: "$self.getRealMessageRequestCount()"
} }
}, },

View file

@ -69,8 +69,8 @@ export default definePlugin({
{ {
find: ".REPLY_QUOTE_MESSAGE_BLOCKED", find: ".REPLY_QUOTE_MESSAGE_BLOCKED",
replacement: { replacement: {
match: /\.onClickReply,.+?}\),(?=\i,\i,\i\])/, match: /(?<="aria-label":\i,children:\[)(?=\i,\i,\i\])/,
replace: "$&$self.ReplyTimestamp(arguments[0])," replace: "$self.ReplyTimestamp(arguments[0]),"
} }
} }
], ],

View file

@ -444,7 +444,7 @@ export default definePlugin({
} }
}, },
{ {
find: '"GuildChannelStore"', find: '="GuildChannelStore",',
replacement: [ replacement: [
{ {
// Make GuildChannelStore contain hidden channels // Make GuildChannelStore contain hidden channels
@ -453,7 +453,7 @@ export default definePlugin({
}, },
{ {
// Filter hidden channels from GuildChannelStore.getChannels unless told otherwise // Filter hidden channels from GuildChannelStore.getChannels unless told otherwise
match: /(?<=getChannels\(\i)(\){.*?)return (.+?)}/, match: /(?<=getChannels\(\i)(\){.+?)return (.+?)}/,
replace: (_, rest, channels) => `,shouldIncludeHidden${rest}return $self.resolveGuildChannels(${channels},shouldIncludeHidden??arguments[0]==="@favorites");}` replace: (_, rest, channels) => `,shouldIncludeHidden${rest}return $self.resolveGuildChannels(${channels},shouldIncludeHidden??arguments[0]==="@favorites");}`
} }
] ]

View file

@ -48,7 +48,7 @@ export default definePlugin({
authors: [Devs.Rini, Devs.TheKodeToad], authors: [Devs.Rini, Devs.TheKodeToad],
patches: [ patches: [
{ {
find: '?"@":""', find: '?"@":"")',
replacement: { replacement: {
match: /(?<=onContextMenu:\i,children:).*?\)}/, match: /(?<=onContextMenu:\i,children:).*?\)}/,
replace: "$self.renderUsername(arguments[0])}" replace: "$self.renderUsername(arguments[0])}"

View file

@ -42,8 +42,8 @@ export default definePlugin({
{ {
find: ",BURST_REACTION_EFFECT_PLAY", find: ",BURST_REACTION_EFFECT_PLAY",
replacement: { replacement: {
match: /((\i)=\i=>{.{50,100})(\i\(\i,\i\))>=\i(?=.*BURST_REACTION_EFFECT_PLAY:\2)/, match: /(BURST_REACTION_EFFECT_PLAY:\i=>{.{50,100})(\i\(\i,\i\))>=\d+/,
replace: "$1!$self.shouldPlayBurstReaction($3)" replace: "$1!$self.shouldPlayBurstReaction($2)"
} }
}, },
{ {

View file

@ -21,7 +21,7 @@ const getDMChannelIcon = findByCodeLazy(".getChannelIconURL({");
const VoiceStateStore = findStoreLazy("VoiceStateStore"); const VoiceStateStore = findStoreLazy("VoiceStateStore");
const UserSummaryItem = findComponentByCodeLazy("defaultRenderUser", "showDefaultAvatarsForNullUsers"); const UserSummaryItem = findComponentByCodeLazy("defaultRenderUser", "showDefaultAvatarsForNullUsers");
const Avatar = findComponentByCodeLazy(".status)/2):0"); const Avatar = findComponentByCodeLazy(".AVATAR_STATUS_TYPING_16;");
const GroupDMAvatars = findComponentByCodeLazy(".AvatarSizeSpecs[", "getAvatarURL"); const GroupDMAvatars = findComponentByCodeLazy(".AvatarSizeSpecs[", "getAvatarURL");
const ActionButtonClasses = findByPropsLazy("actionButton", "highlight"); const ActionButtonClasses = findByPropsLazy("actionButton", "highlight");

View file

@ -89,7 +89,7 @@ export default definePlugin({
find: "AudioContextSettingsMigrated", find: "AudioContextSettingsMigrated",
replacement: [ replacement: [
{ {
match: /(?<=isLocalMute\(\i,\i\),volume:(\i).+?\i\(\i,\i,)\1(?=\))/, match: /(?<=isLocalMute\(\i,\i\),volume:.+?volume:)\i(?=})/,
replace: "$&>200?200:$&" replace: "$&>200?200:$&"
}, },
{ {

View file

@ -109,12 +109,11 @@ export default definePlugin({
match: /(\i)\?null:\(0,\i\.jsx\)\(\i\.\i,{className:\i\.reactionCount,.*?}\),/, match: /(\i)\?null:\(0,\i\.jsx\)\(\i\.\i,{className:\i\.reactionCount,.*?}\),/,
replace: "$&$1?null:$self.renderUsers(this.props)," replace: "$&$1?null:$self.renderUsers(this.props),"
} }
}, }, {
{
find: '"MessageReactionsStore"', find: '"MessageReactionsStore"',
replacement: { replacement: {
match: /function (\i)\(\){(\i)={}(?=.*CONNECTION_OPEN:\1)/, match: /(?<=CONNECTION_OPEN:function\(\){)(\i)={}/,
replace: "$&;$self.reactions=$2;" replace: "$&;$self.reactions=$1"
} }
}, },
{ {