Fix Patches
This commit is contained in:
parent
d1475d4a9d
commit
7a85553962
2 changed files with 21 additions and 14 deletions
|
|
@ -26,19 +26,26 @@ export default definePlugin({
|
||||||
patches: [
|
patches: [
|
||||||
{
|
{
|
||||||
find: "#{intl::MESSAGE_UTILITIES_A11Y_LABEL}),children",
|
find: "#{intl::MESSAGE_UTILITIES_A11Y_LABEL}),children",
|
||||||
replacement: {
|
replacement: [
|
||||||
// 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).+?)/,
|
// TODO: (\i\.\i|\i) is for stable compat
|
||||||
replace: (_, ReactButton, ButtonComponent, showReactButton, message) => "" +
|
match: /(?<=\]\}\)),(.{0,40}togglePopout:.+?\}\))\]\}\):null,(?<=\((\i\.\i|\i),\{label:.+?:null,(\i)\?\(0,\i\.jsxs?\)\(\i\.Fragment.+?message:(\i).+?)/,
|
||||||
`]}):null,Vencord.Api.MessagePopover._buildPopoverElements(${ButtonComponent},${message}),${showReactButton}?${ReactButton}:null,`
|
replace: (_, ReactButton, ButtonComponent, showReactButton, message) => "" +
|
||||||
}
|
`]}):null,Vencord.Api.MessagePopover._buildPopoverElements(${ButtonComponent},${message}),${showReactButton}?${ReactButton}:null,`
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
find: "#{intl::MESSAGE_UTILITIES_A11Y_LABEL}",
|
match: /className:(\i\(\)\(\i\.className,)(?=.{0,200}?#{intl::MESSAGE_UTILITIES_A11Y_LABEL})/,
|
||||||
replacement: {
|
replace: 'className:"vc-message-popover "+$1'
|
||||||
match: /className:(\i\(\)\(\i\.className,.{0,80}?\)),(onClick:.{0,150}?children:\(0,\i\.jsxs?\)\(\i,\{className:)(\i\.innerClassName),children:(\[\i,\i\])/,
|
},
|
||||||
replace: 'className:"vc-message-popover "+$1,$2$3+" vc-message-popover-bar",children:Vencord.Api.MessagePopover._wrapPopoverBar($4)'
|
{
|
||||||
}
|
match: /(?<=#{intl::MESSAGE_UTILITIES_A11Y_LABEL}.{0,30})className:(\i\.innerClassName)/,
|
||||||
|
replace: 'className:$1+" vc-message-popover-bar"'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
match: /(?<=#{intl::MESSAGE_UTILITIES_A11Y_LABEL}.{0,100})children:(\[\i,\i\])/,
|
||||||
|
replace: "children:Vencord.Api.MessagePopover._wrapPopoverBar($1)"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
find: 'role:"article",onMouseEnter',
|
find: 'role:"article",onMouseEnter',
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ export default definePlugin({
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
predicate: () => !settings.store.noQuickReacts,
|
predicate: () => !settings.store.noQuickReacts,
|
||||||
match: /\i(\?null:\(0,\i\.jsxs\).{0,100}message:\i\}\)),\(0,\i\.jsxs?\)\(\i,\{\}\)/,
|
match: /\i(\?null:\(0,\i\.jsxs\).{0,100}message:\i\}\)),\(0,\i\.jsxs?\)\(\i\.\i,\{\}\)/,
|
||||||
replace: "false$1"
|
replace: "false$1"
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue