Update ShowImageDetails.plugin.js

This commit is contained in:
Mirco Wittrien 2020-02-07 18:06:23 +01:00
parent 9e3d207b08
commit 1487e657e8
1 changed files with 1 additions and 1 deletions

View File

@ -154,7 +154,7 @@ var ShowImageDetails = (_ => {
if (this.started) return;
BDFDB.PluginUtils.init(this);
BDFDB.ModuleUtils.patch(this, (BDFDB.ModuleUtils.findByName("renderImageComponent", false).exports || {}), "renderImageComponent", {after: e => {
BDFDB.ModuleUtils.patch(this, BDFDB.ModuleUtils.findByProperties("renderImageComponent"), "renderImageComponent", {after: e => {
if (e.returnValue && e.returnValue.type && (e.returnValue.type.displayName == "LazyImageZoomable" || e.returnValue.type.displayName == "LazyImage") && e.methodArguments[0].original && e.methodArguments[0].src.indexOf("https://media.discordapp.net/attachments") == 0) return this.injectImageDetails(e.methodArguments[0], e.returnValue);
}});