mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-01-07 08:26:23 +00:00
NoUnblockToJump: Also allow jump for ignored users (#3110)
This commit is contained in:
parent
0e813e78d0
commit
0fd76ab15a
2 changed files with 38 additions and 12 deletions
5
src/plugins/noUnblockToJump/README.md
Normal file
5
src/plugins/noUnblockToJump/README.md
Normal 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)
|
|
@ -26,25 +26,46 @@ export default definePlugin({
|
|||
authors: [Devs.dzshn],
|
||||
patches: [
|
||||
{
|
||||
// Clicking on search results to jump
|
||||
find: '.id,"Search Results"',
|
||||
replacement: {
|
||||
match: /if\(.{1,10}\)(.{1,10}\.show\({.{1,50}#{intl::UNBLOCK_TO_JUMP_TITLE})/,
|
||||
replace: "if(false)$1"
|
||||
}
|
||||
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::UNIGNORE_TO_JUMP_TITLE})/,
|
||||
replace: "if(false)$1"
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
// Jump buttton in top right corner of messages
|
||||
find: "renderJumpButton()",
|
||||
replacement: {
|
||||
match: /if\(.{1,10}\)(.{1,10}\.show\({.{1,50}#{intl::UNBLOCK_TO_JUMP_TITLE})/,
|
||||
replace: "if(false)$1"
|
||||
}
|
||||
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::UNIGNORE_TO_JUMP_TITLE})/,
|
||||
replace: "if(false)$1"
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
// Clicking on replied messages to jump
|
||||
find: "flash:!0,returnMessageId",
|
||||
replacement: {
|
||||
match: /.\?(.{1,10}\.show\({.{1,50}#{intl::UNBLOCK_TO_JUMP_TITLE})/,
|
||||
replace: "false?$1"
|
||||
}
|
||||
replacement: [
|
||||
{
|
||||
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"
|
||||
},
|
||||
]
|
||||
}
|
||||
]
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue