feat(plugins): SilentMessageToggle (#586)

Co-authored-by: Ven <vendicated@riseup.net>
This commit is contained in:
Nuckyz 2023-03-08 21:19:28 -03:00 committed by GitHub
parent 253183a16a
commit bff6788546
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 94 additions and 11 deletions

View file

@ -81,8 +81,8 @@ export default definePlugin({
{
find: ".Messages.MESSAGE_ACTIONS_MENU_LABEL",
replacement: {
match: /(?<=favoriteableType:\i,)(?<=(\i)\.getAttribute\("data-type"\).+?)/,
replace: (_, target) => `reverseImageSearchType:${target}.getAttribute("data-role"),`
match: /favoriteableType:\i,(?<=(\i)\.getAttribute\("data-type"\).+?)/,
replace: (m, target) => `${m}reverseImageSearchType:${target}.getAttribute("data-role"),`
}
}
],