1
0
Fork 1
mirror of https://github.com/Vendicated/Vencord.git synced 2025-01-08 08:56:22 +00:00

NoUnblockToJump: Also allow jump for ignored users (#3110)

This commit is contained in:
sadan4 2024-12-29 21:28:22 -05:00 committed by GitHub
parent 0e813e78d0
commit 0fd76ab15a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 38 additions and 12 deletions

View file

@ -0,0 +1,5 @@
# No Unblock To Jump
Removes the popup preventing you to jump to a message from a blocked/ignored user (eg: in search results)
![A modal popup telling you to unblock a user to jump their message](https://github.com/user-attachments/assets/0e4b859d-f3b3-4101-9a83-829afb473d1e)

View file

@ -26,25 +26,46 @@ export default definePlugin({
authors: [Devs.dzshn], authors: [Devs.dzshn],
patches: [ patches: [
{ {
// Clicking on search results to jump
find: '.id,"Search Results"', find: '.id,"Search Results"',
replacement: { replacement: [
match: /if\(.{1,10}\)(.{1,10}\.show\({.{1,50}#{intl::UNBLOCK_TO_JUMP_TITLE})/, {
replace: "if(false)$1" match: /if\(.{1,10}\)(.{1,10}\.show\({.{1,50}#{intl::UNBLOCK_TO_JUMP_TITLE})/,
} replace: "if(false)$1"
},
{
match: /if\(.{1,10}\)(.{1,10}\.show\({.{1,50}#{intl::UNIGNORE_TO_JUMP_TITLE})/,
replace: "if(false)$1"
},
]
}, },
{ {
// Jump buttton in top right corner of messages
find: "renderJumpButton()", find: "renderJumpButton()",
replacement: { replacement: [
match: /if\(.{1,10}\)(.{1,10}\.show\({.{1,50}#{intl::UNBLOCK_TO_JUMP_TITLE})/, {
replace: "if(false)$1" match: /if\(.{1,10}\)(.{1,10}\.show\({.{1,50}#{intl::UNBLOCK_TO_JUMP_TITLE})/,
} replace: "if(false)$1"
},
{
match: /if\(.{1,10}\)(.{1,10}\.show\({.{1,50}#{intl::UNIGNORE_TO_JUMP_TITLE})/,
replace: "if(false)$1"
},
]
}, },
{ {
// Clicking on replied messages to jump
find: "flash:!0,returnMessageId", find: "flash:!0,returnMessageId",
replacement: { replacement: [
match: /.\?(.{1,10}\.show\({.{1,50}#{intl::UNBLOCK_TO_JUMP_TITLE})/, {
replace: "false?$1" match: /.\?(.{1,10}\.show\({.{1,50}#{intl::UNBLOCK_TO_JUMP_TITLE})/,
} replace: "false?$1"
},
{
match: /.\?(.{1,10}\.show\({.{1,50}#{intl::UNIGNORE_TO_JUMP_TITLE})/,
replace: "false?$1"
},
]
} }
] ]
}); });