Fix store finds
This commit is contained in:
parent
de9122b05b
commit
ec34412100
|
@ -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"
|
||||||
|
|
|
@ -210,7 +210,7 @@ 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.+?)/,
|
||||||
|
|
|
@ -38,8 +38,8 @@ export default definePlugin({
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
...[
|
...[
|
||||||
'displayName="MessageStore"',
|
'="MessageStore",',
|
||||||
'displayName="ReadStateStore"'
|
'="ReadStateStore",'
|
||||||
].map(find => ({
|
].map(find => ({
|
||||||
find,
|
find,
|
||||||
predicate: () => Settings.plugins.NoBlockedMessages.ignoreBlockedMessages === true,
|
predicate: () => Settings.plugins.NoBlockedMessages.ignoreBlockedMessages === true,
|
||||||
|
|
|
@ -191,7 +191,7 @@ 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: /(?<=if\(null==(\i))(?=.{0,160}?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})`
|
||||||
|
@ -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.+?}\)(?=\?)/,
|
||||||
|
|
|
@ -51,7 +51,7 @@ export default definePlugin({
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
find: '.displayName="SpotifyStore"',
|
find: '"displayName","SpotifyStore")',
|
||||||
replacement: [
|
replacement: [
|
||||||
{
|
{
|
||||||
predicate: () => settings.store.noSpotifyAutoPause,
|
predicate: () => settings.store.noSpotifyAutoPause,
|
||||||
|
|
|
@ -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,).+?\)/,
|
||||||
|
|
Loading…
Reference in a new issue