diff --git a/src/plugins/noUnblockToJump/README.md b/src/plugins/noUnblockToJump/README.md new file mode 100644 index 000000000..326bca3b8 --- /dev/null +++ b/src/plugins/noUnblockToJump/README.md @@ -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) diff --git a/src/plugins/noUnblockToJump/index.ts b/src/plugins/noUnblockToJump/index.ts index cde0e19e5..621129269 100644 --- a/src/plugins/noUnblockToJump/index.ts +++ b/src/plugins/noUnblockToJump/index.ts @@ -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" + }, + ] } ] });