Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(plugin): Stickers+ #1611

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open

feat(plugin): Stickers+ #1611

wants to merge 17 commits into from

Conversation

lekoOwO
Copy link

@lekoOwO lekoOwO commented Aug 3, 2023

This plugin allows user send stickers from more sticker providers.
Currently LINE and self-made stickerpack files supported.

Inspired by https://github.com/Pitu/Magane .

hamachi25

This comment was marked as off-topic.

{
find: ".stickerIcon,",
replacement: [{
match: /(children:\(0,\w\.jsx\)\()([\w.]+?)(,{innerClassName.{10,30}\.stickerButton)/,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
match: /(children:\(0,\w\.jsx\)\()([\w.]+?)(,{innerClassName.{10,30}\.stickerButton)/,
match: /(children:\(0,\i\.jsx\)\()(\i\.\i)(,{innerClassName.{10,30}\.stickerButton)/,

return `${head}${isMoreStickers}?$self.stickerButton:${button}${tail}`;
}
}, {
match: /(let \w=)(\w\.useCallback\(\(\)=>\{\(0,\w+\.\w+\)\([\w\.]*?\.STICKER,.*?);/,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
match: /(let \w=)(\w\.useCallback\(\(\)=>\{\(0,\w+\.\w+\)\([\w\.]*?\.STICKER,.*?);/,
match: /(let \i=)(\i\.useCallback\(\(\)=>\{\(0,\i\.toggleExpressionPicker\)\(\i\.ExpressionPickerViewType\.STICKER,.*?);/,

return `${decl}arguments[0]?.stickersType?${newCb}:${cb};`;
}
}, {
match: /(\w)=((\w)===\w+?\.\w+?\.STICKER)/,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
match: /(\w)=((\w)===\w+?\.\w+?\.STICKER)/,
match: /(\i)=((\i)===\i\.ExpressionPickerViewType\.STICKER)/,

{
find: '"ChannelTextAreaButtons"',
replacement: {
match: /,\(null===\(\w=\w\.stickers\)\|\|void 0.*?(\w)\.push\((\(0,\w\.jsx\))\((.+?),{disabled:\w,type:(\w)},"sticker"\)\)/,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
match: /,\(null===\(\w=\w\.stickers\)\|\|void 0.*?(\w)\.push\((\(0,\w\.jsx\))\((.+?),{disabled:\w,type:(\w)},"sticker"\)\)/,
match: /,\(null===\(\i=\i\.stickers\)\|\|void 0.*?(\i)\.push\((\(0,\i\.jsx\))\((.+?),{disabled:\i,type:(\i)},"sticker"\)\)/,

{
find: '==="remove_text"',
replacement: {
match: /,\w\.insertText=\w=>{[\w ;]*?1===\w\.length&&.+?==="remove_text"/,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
match: /,\w\.insertText=\w=>{[\w ;]*?1===\w\.length&&.+?==="remove_text"/,
match: /,\i\.insertText=\i=>{1===\i\.length&&.+?==="remove_text"/,

is [\w ;]*? needed? because i dont see anything there

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if it is required in the current version.
In the previous version, they made a space/change line here (their minifier did this? dunno)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants