From 2d3032330fe4835117b768aff3e3c592e120e167 Mon Sep 17 00:00:00 2001 From: leko Date: Sun, 26 Jan 2025 23:21:27 +0800 Subject: [PATCH] fix(MoreStickers): MoreSticker button (#128) --- src/equicordplugins/moreStickers/index.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/equicordplugins/moreStickers/index.tsx b/src/equicordplugins/moreStickers/index.tsx index be3dea41..34b43356 100644 --- a/src/equicordplugins/moreStickers/index.tsx +++ b/src/equicordplugins/moreStickers/index.tsx @@ -32,7 +32,7 @@ export default definePlugin({ patches: [ { - find: "#{intl::STICKER_BUTTON_LABEL}", + find: "ChannelStickerPickerButton", replacement: [{ match: /(children:\(0,\i\.jsx\)\()([\w.]+?)(,{innerClassName.{10,30}\.stickerButton)/, replace: (_, head, button, tail) => { @@ -56,7 +56,7 @@ export default definePlugin({ { find: ".gifts)", replacement: { - match: /\(null===\(\i=\i\.stickers\).*?(\i)\.push\((\(0,\i\.jsx\))\((.+?),{disabled:\w,type:(\i)},"sticker"\)\)/, + match: /,.{0,5}\(null===\(\w=\w\.stickers\)\|\|void 0.*?(\w)\.push\((\(0,\w\.jsx\))\((.+?),{disabled:\w,type:(\w)},"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+"))`; @@ -64,7 +64,7 @@ export default definePlugin({ } }, { - find: "role:\"tablist\",\"aria-label\":", + find: `role:"tablist","aria-label":`, replacement: { match: /role:"tablist",.*?,?"aria-label":.+?\),children:(\[.*?\)\]}\)}\):null,)(.*?closePopout:\w.*?:null)/s, replace: m => {