Merge branch 'main' into main

This commit is contained in:
byron 2024-03-28 23:45:23 -04:00 committed by GitHub
commit 082227301e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 41 additions and 33 deletions

View file

@ -1,7 +1,7 @@
{ {
"name": "vencord", "name": "vencord",
"private": "true", "private": "true",
"version": "1.7.3", "version": "1.7.4",
"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

@ -41,7 +41,7 @@ export default definePlugin({
authors: [Devs.zt, Devs.Trwy], authors: [Devs.zt, Devs.Trwy],
patches: [ patches: [
{ {
find: ".displayName=\"MaskedLinkStore\"", find: '="MaskedLinkStore",',
replacement: { replacement: {
match: /(?<=isTrustedDomain\(\i\){)return \i\(\i\)/, match: /(?<=isTrustedDomain\(\i\){)return \i\(\i\)/,
replace: "return true" replace: "return true"

View file

@ -26,7 +26,7 @@ export default definePlugin({
"Change GIF alt text from simply being 'GIF' to containing the gif tags / filename", "Change GIF alt text from simply being 'GIF' to containing the gif tags / filename",
patches: [ patches: [
{ {
find: "onCloseImage=", find: '"onCloseImage",',
replacement: { replacement: {
match: /(return.{0,10}\.jsx.{0,50}isWindowFocused)/, match: /(return.{0,10}\.jsx.{0,50}isWindowFocused)/,
replace: replace:

View file

@ -15,8 +15,8 @@ export default definePlugin({
{ {
find: ".GIFPickerResultTypes.SEARCH", find: ".GIFPickerResultTypes.SEARCH",
replacement: [{ replacement: [{
match: "this.state={resultType:null}", match: /(?<="state",{resultType:)null/,
replace: 'this.state={resultType:"Favorites"}' replace: '"Favorites"'
}] }]
} }
] ]

View file

@ -82,7 +82,7 @@ export default definePlugin({
find: "this.renderArtisanalHack()", find: "this.renderArtisanalHack()",
replacement: [ replacement: [
{ // Fade in on layer { // Fade in on layer
match: /(?<=(\i)\.contextType=\i\.AccessibilityPreferencesContext;)/, match: /(?<=\((\i),"contextType",\i\.AccessibilityPreferencesContext\);)/,
replace: "$1=$self.Layer;", replace: "$1=$self.Layer;",
predicate: () => settings.store.disableFade predicate: () => settings.store.disableFade
}, },
@ -107,11 +107,11 @@ export default definePlugin({
], ],
predicate: () => settings.store.disableFade predicate: () => settings.store.disableFade
}, },
{ // Load menu stuff on hover, not on click { // Load menu TOC eagerly
find: "Messages.USER_SETTINGS_WITH_BUILD_OVERRIDE.format", find: "Messages.USER_SETTINGS_WITH_BUILD_OVERRIDE.format",
replacement: { replacement: {
match: /(?<=handleOpenSettingsContextMenu.{0,250}?\i\.el\(("[^"]+")\)\.then\([^;]*?("\d+").*?Messages\.USER_SETTINGS,)(?=onClick:)/, match: /(?<=(\i)\(this,"handleOpenSettingsContextMenu",.{0,100}?openContextMenuLazy.{0,100}?(await Promise\.all[^};]*?\)\)).*?,)(?=\1\(this)/,
replace: "onMouseEnter(){Vencord.Webpack.wreq.el($1).then(()=>Vencord.Webpack.wreq($2));}," replace: "(async ()=>$2)(),"
}, },
predicate: () => settings.store.eagerLoad predicate: () => settings.store.eagerLoad
}, },

View file

@ -61,8 +61,8 @@ export default definePlugin({
}, },
// Remove NEW label from decor avatar decorations // Remove NEW label from decor avatar decorations
{ {
match: /(?<=\.Section\.PREMIUM_PURCHASE&&\i;if\()(?<=avatarDecoration:(\i).+?)/, match: /(?<=\.Section\.PREMIUM_PURCHASE&&\i)(?<=avatarDecoration:(\i).+?)/,
replace: "$1.skuId===$self.SKU_ID||" replace: "||$1.skuId===$self.SKU_ID"
} }
] ]
}, },

View file

@ -29,7 +29,7 @@ export default definePlugin({
{ {
find: ".Messages.BOT_CALL_IDLE_DISCONNECT", find: ".Messages.BOT_CALL_IDLE_DISCONNECT",
replacement: { replacement: {
match: /,?(?=this\.idleTimeout=new \i\.Timeout)/, match: /,?(?=\i\(this,"idleTimeout",new \i\.Timeout\))/,
replace: ";return;" replace: ";return;"
} }
}, },

View file

@ -64,7 +64,7 @@ export default definePlugin({
} }
}, },
{ {
find: ".isStaff=()", find: '"isStaff",',
predicate: () => settings.store.enableIsStaff, predicate: () => settings.store.enableIsStaff,
replacement: [ replacement: [
{ {

View file

@ -388,6 +388,14 @@ export default definePlugin({
match: /\i\.\i\.isPremium\(\i\.\i\.getCurrentUser\(\)\)/, match: /\i\.\i\.isPremium\(\i\.\i\.getCurrentUser\(\)\)/,
replace: "true" replace: "true"
} }
},
// Make all Soundboard sounds available
{
find: 'type:"GUILD_SOUNDBOARD_SOUND_CREATE"',
replacement: {
match: /(?<=type:"(?:SOUNDBOARD_SOUNDS_RECEIVED|GUILD_SOUNDBOARD_SOUND_CREATE|GUILD_SOUNDBOARD_SOUND_UPDATE|GUILD_SOUNDBOARD_SOUNDS_UPDATE)".+?available:)\i\.available/g,
replace: "true"
}
} }
], ],

View file

@ -29,10 +29,10 @@ export default definePlugin({
authors: [Devs.Ven], authors: [Devs.Ven],
patches: [{ patches: [{
find: ".handleSelectGIF=", find: '"handleSelectGIF",',
replacement: { replacement: {
match: /\.handleSelectGIF=(\i)=>\{/, match: /"handleSelectGIF",(\i)=>\{/,
replace: ".handleSelectGIF=$1=>{if (!this.props.className) return $self.handleSelect($1);" replace: '"handleSelectGIF",$1=>{if (!this.props.className) return $self.handleSelect($1);'
} }
}], }],

View file

@ -210,10 +210,10 @@ export default definePlugin({
patches: [ patches: [
{ {
find: '.displayName="LocalActivityStore"', find: '="LocalActivityStore",',
replacement: [ replacement: [
{ {
match: /HANG_STATUS.+?(?=!\i\(\i,\i\)&&)(?<=(\i)\.push.+?)/, match: /HANG_STATUS.+?(?=!\i\(\)\(\i,\i\)&&)(?<=(\i)\.push.+?)/,
replace: (m, activities) => `${m}${activities}=${activities}.filter($self.isActivityNotIgnored);` replace: (m, activities) => `${m}${activities}=${activities}.filter($self.isActivityNotIgnored);`
} }
] ]

View file

@ -38,8 +38,8 @@ export default definePlugin({
] ]
}, },
...[ ...[
'displayName="MessageStore"', '="MessageStore",',
'displayName="ReadStateStore"' '"displayName","ReadStateStore")'
].map(find => ({ ].map(find => ({
find, find,
predicate: () => Settings.plugins.NoBlockedMessages.ignoreBlockedMessages === true, predicate: () => Settings.plugins.NoBlockedMessages.ignoreBlockedMessages === true,

View file

@ -59,7 +59,7 @@ export default definePlugin({
find: "GuildHomeFeedbackExperiment.definition.id", find: "GuildHomeFeedbackExperiment.definition.id",
replacement: [ replacement: [
{ {
match: /return{showFeedback:\i,setOnDismissedFeedback:(\i)}/, match: /return{showFeedback:.+?,setOnDismissedFeedback:(\i)}/,
replace: "return{showFeedback:false,setOnDismissedFeedback:$1}" replace: "return{showFeedback:false,setOnDismissedFeedback:$1}"
} }
] ]

View file

@ -138,7 +138,7 @@ export default definePlugin({
all: true, all: true,
// Render null instead of the buttons if the channel is hidden // Render null instead of the buttons if the channel is hidden
replacement: { replacement: {
match: /(?<=renderOpenChatButton=\(\)=>{)/, match: /(?<="renderOpenChatButton",\(\)=>{)/,
replace: "if($self.isHiddenChannel(this.props.channel))return null;" replace: "if($self.isHiddenChannel(this.props.channel))return null;"
} }
}, },
@ -191,10 +191,10 @@ export default definePlugin({
}, },
{ {
// Hide the new version of unreads box for hidden channels // Hide the new version of unreads box for hidden channels
find: '.displayName="ChannelListUnreadsStore"', find: '="ChannelListUnreadsStore",',
replacement: { replacement: {
match: /(?<=if\(null==(\i))(?=.{0,160}?getHasImportantUnread\)\(\i\))/g, // Global because Discord has multiple methods like that in the same module match: /(?=&&\(0,\i\.getHasImportantUnread\)\((\i)\))/g, // Global because Discord has multiple methods like that in the same module
replace: (_, channel) => `||$self.isHiddenChannel(${channel})` replace: (_, channel) => `&&!$self.isHiddenChannel(${channel})`
} }
}, },
{ {
@ -218,19 +218,19 @@ export default definePlugin({
find: "Missing channel in Channel.renderHeaderToolbar", find: "Missing channel in Channel.renderHeaderToolbar",
replacement: [ replacement: [
{ {
match: /(?<=renderHeaderToolbar=\(\)=>{.+?case \i\.\i\.GUILD_TEXT:)(?=.+?(\i\.push.{0,50}channel:(\i)},"notifications"\)\)))(?<=isLurking:(\i).+?)/, match: /(?<="renderHeaderToolbar",\(\)=>{.+?case \i\.\i\.GUILD_TEXT:)(?=.+?(\i\.push.{0,50}channel:(\i)},"notifications"\)\)))(?<=isLurking:(\i).+?)/,
replace: (_, pushNotificationButtonExpression, channel, isLurking) => `if(!${isLurking}&&$self.isHiddenChannel(${channel})){${pushNotificationButtonExpression};break;}` replace: (_, pushNotificationButtonExpression, channel, isLurking) => `if(!${isLurking}&&$self.isHiddenChannel(${channel})){${pushNotificationButtonExpression};break;}`
}, },
{ {
match: /(?<=renderHeaderToolbar=\(\)=>{.+?case \i\.\i\.GUILD_MEDIA:)(?=.+?(\i\.push.{0,40}channel:(\i)},"notifications"\)\)))(?<=isLurking:(\i).+?)/, match: /(?<="renderHeaderToolbar",\(\)=>{.+?case \i\.\i\.GUILD_MEDIA:)(?=.+?(\i\.push.{0,40}channel:(\i)},"notifications"\)\)))(?<=isLurking:(\i).+?)/,
replace: (_, pushNotificationButtonExpression, channel, isLurking) => `if(!${isLurking}&&$self.isHiddenChannel(${channel})){${pushNotificationButtonExpression};break;}` replace: (_, pushNotificationButtonExpression, channel, isLurking) => `if(!${isLurking}&&$self.isHiddenChannel(${channel})){${pushNotificationButtonExpression};break;}`
}, },
{ {
match: /renderMobileToolbar=\(\)=>{.+?case \i\.\i\.GUILD_DIRECTORY:(?<=let{channel:(\i).+?)/, match: /"renderMobileToolbar",\(\)=>{.+?case \i\.\i\.GUILD_DIRECTORY:(?<=let{channel:(\i).+?)/,
replace: (m, channel) => `${m}if($self.isHiddenChannel(${channel}))break;` replace: (m, channel) => `${m}if($self.isHiddenChannel(${channel}))break;`
}, },
{ {
match: /(?<=renderHeaderBar=\(\)=>{.+?hideSearch:(\i)\.isDirectory\(\))/, match: /(?<="renderHeaderBar",\(\)=>{.+?hideSearch:(\i)\.isDirectory\(\))/,
replace: (_, channel) => `||$self.isHiddenChannel(${channel})` replace: (_, channel) => `||$self.isHiddenChannel(${channel})`
}, },
{ {
@ -442,7 +442,7 @@ export default definePlugin({
} }
}, },
{ {
find: '.displayName="GuildChannelStore"', find: '="GuildChannelStore",',
replacement: [ replacement: [
{ {
// Make GuildChannelStore contain hidden channels // Make GuildChannelStore contain hidden channels
@ -465,7 +465,7 @@ export default definePlugin({
} }
}, },
{ {
find: '.displayName="NowPlayingViewStore"', find: '="NowPlayingViewStore",',
replacement: { replacement: {
// Make active now voice states on hidden channels // Make active now voice states on hidden channels
match: /(getVoiceStateForUser.{0,150}?)&&\i\.\i\.canWithPartialContext.{0,20}VIEW_CHANNEL.+?}\)(?=\?)/, match: /(getVoiceStateForUser.{0,150}?)&&\i\.\i\.canWithPartialContext.{0,20}VIEW_CHANNEL.+?}\)(?=\?)/,

View file

@ -51,7 +51,7 @@ export default definePlugin({
}, },
}, },
{ {
find: '.displayName="SpotifyStore"', find: '"displayName","SpotifyStore")',
replacement: [ replacement: [
{ {
predicate: () => settings.store.noSpotifyAutoPause, predicate: () => settings.store.noSpotifyAutoPause,

View file

@ -71,7 +71,7 @@ export default definePlugin({
}, },
// Prevent the MediaEngineStore from overwriting our LocalVolumes above 200 with the ones the Discord Audio Context Settings sync sends // Prevent the MediaEngineStore from overwriting our LocalVolumes above 200 with the ones the Discord Audio Context Settings sync sends
{ {
find: '.displayName="MediaEngineStore"', find: '="MediaEngineStore",',
replacement: [ replacement: [
{ {
match: /(\.settings\.audioContextSettings.+?)(\i\[\i\])=(\i\.volume)(.+?setLocalVolume\(\i,).+?\)/, match: /(\.settings\.audioContextSettings.+?)(\i\[\i\])=(\i\.volume)(.+?setLocalVolume\(\i,).+?\)/,