Reapply "Fix Canary Patches"

This reverts commit b075f7b6a4.
This commit is contained in:
thororen1234 2025-04-03 16:11:06 -04:00
parent b075f7b6a4
commit c8b5337d18
No known key found for this signature in database
13 changed files with 16 additions and 16 deletions

View file

@ -56,7 +56,7 @@ export default definePlugin({
{
find: ".gifts)",
replacement: {
match: /,.{0,5}\(null===\(\w=\w\.stickers\)\|\|void 0.*?(\w)\.push\((\(0,\w\.jsx\))\((.+?),{disabled:\w,type:(\w)},"sticker"\)\)\)/,
match: /,.{0,5}\(null==\(\i=\i\.stickers\)\?void 0.*?(\i)\.push\((\(0,\w\.jsx\))\((.+?),{disabled:\i,type:(\i)},"sticker"\)\)\)/,
replace: (m, _, jsx, compo, type) => {
const c = "arguments[0].type";
return `${m},${c}?.submit?.button&&${_}.push(${jsx}(${compo},{disabled:!${c}?.submit?.button,type:${type},stickersType:"stickers+"},"stickers+"))`;