Fix plugins broken by latest Discord update (#3609)
This commit is contained in:
parent
93294673de
commit
330c3cead7
9 changed files with 11 additions and 15 deletions
|
|
@ -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: (m, _, notice) => `if(${notice}?.id=="VencordNotice")return(${notice}=null,Vencord.Api.Notices.nextNotice(),true);${m}`
|
replace: (m, notice) => `if(${notice}?.id=="VencordNotice")return(${notice}=null,Vencord.Api.Notices.nextNotice(),true);${m}`
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ export default definePlugin({
|
||||||
replace: "$self.getIdleTimeout()||"
|
replace: "$self.getIdleTimeout()||"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
match: /Math\.min\((\i\.\i\.getSetting\(\)\*\i\.\i\.\i\.SECOND),\i\.\i\)/,
|
match: /Math\.min\((\i\*\i\.\i\.\i\.SECOND),\i\.\i\)/,
|
||||||
replace: "$1" // Decouple idle from afk (phone notifications will remain at user setting or 10 min maximum)
|
replace: "$1" // Decouple idle from afk (phone notifications will remain at user setting or 10 min maximum)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -161,7 +161,7 @@ export default definePlugin({
|
||||||
{
|
{
|
||||||
find: "#{intl::WELCOME_CTA_LABEL}",
|
find: "#{intl::WELCOME_CTA_LABEL}",
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /innerClassName:\i\.welcomeCTAButton,(?<={channel:\i,message:\i}=(\i).+?)/,
|
match: /className:\i\.welcomeCTA,(?<={channel:\i,message:\i}=(\i).+?)/,
|
||||||
replace: "$&onContextMenu:(vcEvent)=>$self.pickSticker(vcEvent, $1),"
|
replace: "$&onContextMenu:(vcEvent)=>$self.pickSticker(vcEvent, $1),"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,9 +28,9 @@ export default definePlugin({
|
||||||
{
|
{
|
||||||
find: "#{intl::MESSAGE_UTILITIES_A11Y_LABEL}",
|
find: "#{intl::MESSAGE_UTILITIES_A11Y_LABEL}",
|
||||||
replacement: {
|
replacement: {
|
||||||
// isExpanded = isShiftPressed && other conditions...
|
// isExpanded: isShiftPressed && other conditions...
|
||||||
match: /(?<=(\i)=)\i(?=&&.+?isExpanded:\1)/,
|
match: /isExpanded:\i&&(.+?),/,
|
||||||
replace: "true"
|
replace: "isExpanded:$1,"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -306,7 +306,7 @@ export default definePlugin({
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// Export the channel for the users allowed component patch
|
// Export the channel for the users allowed component patch
|
||||||
match: /maxUsers:\i,users:\i(?<=channel:(\i).+?)/,
|
match: /maxUsers:\d+?,users:\i(?<=channel:(\i).+?)/,
|
||||||
replace: (m, channel) => `${m},shcChannel:${channel}`
|
replace: (m, channel) => `${m},shcChannel:${channel}`
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -42,8 +42,8 @@ export default definePlugin({
|
||||||
{
|
{
|
||||||
find: ",BURST_REACTION_EFFECT_PLAY",
|
find: ",BURST_REACTION_EFFECT_PLAY",
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /(?<=(\i)=\i=>{.+?)(\i\(\i,\i\))>=\i(?=\).+BURST_REACTION_EFFECT_PLAY:\1)/,
|
match: /(BURST_REACTION_EFFECT_PLAY:\i=>{.+?if\()(\(\(\i,\i\)=>.+?\(\i,\i\))>=\d+?(?=\))/,
|
||||||
replace: "!$self.shouldPlayBurstReaction($2)"
|
replace: (_, rest, playingCount) => `${rest}!$self.shouldPlayBurstReaction(${playingCount})`
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -142,7 +142,7 @@ export default definePlugin({
|
||||||
{
|
{
|
||||||
find: ".controlButtonWrapper,",
|
find: ".controlButtonWrapper,",
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /(?<=function (\i).{0,100}\()\i.Fragment,(?=.+?toolbar:\1\(\))/,
|
match: /(?<=toolbar:function\(.{0,100}\()\i.Fragment,/,
|
||||||
replace: "$self.ToolboxFragmentWrapper,"
|
replace: "$self.ToolboxFragmentWrapper,"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -142,10 +142,6 @@ export default definePlugin({
|
||||||
match: /!\i\.isPlatformEmbedded/,
|
match: /!\i\.isPlatformEmbedded/,
|
||||||
replace: "false"
|
replace: "false"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
match: /return\s*?\[.{0,50}?(?=\?\(0,\i\.jsxs?.{0,100}?id:"copy-image")/,
|
|
||||||
replace: "return [true"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
match: /(?<=#{intl::COPY_IMAGE_MENU_ITEM}\),)action:/,
|
match: /(?<=#{intl::COPY_IMAGE_MENU_ITEM}\),)action:/,
|
||||||
replace: "action:()=>$self.copyImage(arguments[0]),oldAction:"
|
replace: "action:()=>$self.copyImage(arguments[0]),oldAction:"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue