diff options
author | Vendicated <vendicated@riseup.net> | 2023-02-01 18:00:25 +0100 |
---|---|---|
committer | Vendicated <vendicated@riseup.net> | 2023-02-01 18:00:25 +0100 |
commit | 70278f64a96af32d69de25ae1cef38294a640158 (patch) | |
tree | 652536e5212cc5fefd36060884be061505ced468 /src/plugins/reverseImageSearch.tsx | |
parent | 7b1d03699de7349fdd373b8418cbbc7936970a85 (diff) | |
download | Vencord-70278f64a96af32d69de25ae1cef38294a640158.tar.gz Vencord-70278f64a96af32d69de25ae1cef38294a640158.tar.bz2 Vencord-70278f64a96af32d69de25ae1cef38294a640158.zip |
Fix broken patches
Diffstat (limited to 'src/plugins/reverseImageSearch.tsx')
-rw-r--r-- | src/plugins/reverseImageSearch.tsx | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/plugins/reverseImageSearch.tsx b/src/plugins/reverseImageSearch.tsx index 8de9de7..4d9f040 100644 --- a/src/plugins/reverseImageSearch.tsx +++ b/src/plugins/reverseImageSearch.tsx @@ -43,17 +43,18 @@ export default definePlugin({ } }, { // pass the target to the open link menu so we can check if it's an image - find: "REMOVE_ALL_REACTIONS_CONFIRM_BODY,", - replacement: { - // url1 = url2 = props.attachment.url - // ... - // OpenLinks(url2 != null ? url2 : url1, someStuffs) - // - // the back references are needed because the code is like Z(a!=null?b:c,d), no way to match that - // otherwise - match: /(?<props>.).onHeightUpdate.{0,200}(.)=(.)=.\.url;.+?\(null!=\3\?\3:\2[^)]+/, - replace: "$&,$<props>.target" - } + find: ".Messages.MESSAGE_ACTIONS_MENU_LABEL", + replacement: [ + { + match: /ariaLabel:\i\.Z\.Messages\.MESSAGE_ACTIONS_MENU_LABEL/, + replace: "$&,_vencordTarget:arguments[0].target" + }, + { + // var f = props.itemHref, .... MakeNativeMenu(null != f ? f : blah) + match: /(\i)=\i\.itemHref,.+?\(null!=\1\?\1:.{1,10}(?=\))/, + replace: "$&,arguments[0]._vencordTarget" + } + ] }], makeMenu(src: string, target: HTMLElement) { |