Update ImageUtilities.plugin.js

This commit is contained in:
Mirco Wittrien 2023-03-08 15:58:20 +01:00
parent 62eb44738c
commit 4d28c6be21
1 changed files with 0 additions and 1 deletions

View File

@ -707,7 +707,6 @@ module.exports = (_ => {
}
onMessageContextMenu (e) {
console.log(e);
if (!e.instance.props.message || !e.instance.props.channel || !e.instance.props.target) return;
const target = e.instance.props.target.tagName == "A" && BDFDB.DOMUtils.containsClass(e.instance.props.target, BDFDB.disCN.imageoriginallink) && e.instance.props.target.parentElement.querySelector("img, video") || e.instance.props.target;
if (target.tagName == "A" && e.instance.props.message.embeds && e.instance.props.message.embeds[0] && (e.instance.props.message.embeds[0].type == "image" || e.instance.props.message.embeds[0].type == "video" || e.instance.props.message.embeds[0].type == "gifv")) this.injectItem(e, [target.href], null, true);