fix plugins patching the message popover
This commit is contained in:
parent
17907c8032
commit
e4c04f6dc9
3 changed files with 5 additions and 4 deletions
|
|
@ -25,9 +25,10 @@ export default definePlugin({
|
|||
authors: [Devs.KingFish, Devs.Ven, Devs.Nuckyz],
|
||||
patches: [
|
||||
{
|
||||
find: "#{intl::MESSAGE_UTILITIES_A11Y_LABEL}",
|
||||
find: "#{intl::MESSAGE_UTILITIES_A11Y_LABEL}),children",
|
||||
replacement: {
|
||||
match: /(?<=\]\}\)),(.{0,40}togglePopout:.+?\}\))\]\}\):null,(?<=\((\i),\{label:.+?:null,(\i)\?\(0,\i\.jsxs?\)\(\i\.Fragment.+?message:(\i).+?)/,
|
||||
// TODO: (\i\.\i|\i) is for stable compat
|
||||
match: /(?<=\]\}\)),(.{0,40}togglePopout:.+?\}\))\]\}\):null,(?<=\((\i\.\i|\i),\{label:.+?:null,(\i)\?\(0,\i\.jsxs?\)\(\i\.Fragment.+?message:(\i).+?)/,
|
||||
replace: (_, ReactButton, ButtonComponent, showReactButton, message) => "" +
|
||||
`]}):null,Vencord.Api.MessagePopover._buildPopoverElements(${ButtonComponent},${message}),${showReactButton}?${ReactButton}:null,`
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ export default definePlugin({
|
|||
|
||||
patches: [
|
||||
{
|
||||
find: "#{intl::MESSAGE_UTILITIES_A11Y_LABEL}",
|
||||
find: "#{intl::MESSAGE_UTILITIES_A11Y_LABEL}),children",
|
||||
replacement: {
|
||||
match: /(?<=length>=3\?.{0,40})\.slice\(0,3\)/,
|
||||
replace: ".slice(0,$self.reactionCount)"
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ export default definePlugin({
|
|||
|
||||
patches: [
|
||||
{
|
||||
find: "#{intl::MESSAGE_UTILITIES_A11Y_LABEL}",
|
||||
find: "#{intl::MESSAGE_UTILITIES_A11Y_LABEL}),children",
|
||||
replacement: {
|
||||
// isExpanded: isShiftPressed && other conditions...
|
||||
match: /isExpanded:\i&&(.+?),/,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue