Update ImageUtilities.plugin.js
This commit is contained in:
parent
df42682026
commit
de5cf807d4
|
@ -2,7 +2,7 @@
|
|||
* @name ImageUtilities
|
||||
* @author DevilBro
|
||||
* @authorId 278543574059057154
|
||||
* @version 5.3.6
|
||||
* @version 5.3.7
|
||||
* @description Adds several Utilities for Images/Videos (Gallery, Download, Reverse Search, Zoom, Copy, etc.)
|
||||
* @invite Jx3TjNS
|
||||
* @donate https://www.paypal.me/MircoWittrien
|
||||
|
@ -1211,6 +1211,7 @@ module.exports = (_ => {
|
|||
|
||||
processLazyImage (e) {
|
||||
if (e.node) {
|
||||
for (let ele of [e.node.src && e.node, ...e.node.querySelectorAll("[src]")].filter(n => n)) ele.src = this.removeFormatInUrl(ele.src);
|
||||
if (e.instance.props.resized) {
|
||||
for (let selector of ["embedfull", "embedinlinemedia", "embedgridcontainer", "imagemosaicattachmentscontainer", "imagemosaiconebyonegridsingle"]) {
|
||||
let parent = BDFDB.DOMUtils.getParent(BDFDB.dotCN[selector], e.node);
|
||||
|
@ -1223,7 +1224,7 @@ module.exports = (_ => {
|
|||
ele.style.setProperty("height", e.instance.props.height + "px");
|
||||
ele.style.setProperty("max-height", e.instance.props.height + "px");
|
||||
}
|
||||
for (let ele of [e.node.src && e.node, ...e.node.querySelectorAll("[src]")].filter(n => n)) ele.src = this.removeSizeInUrl(this.removeFormatInUrl(ele.src));
|
||||
for (let ele of [e.node.src && e.node, ...e.node.querySelectorAll("[src]")].filter(n => n)) ele.src = this.removeSizeInUrl(ele.src);
|
||||
if (e.instance.state.readyState != BDFDB.DiscordConstants.ImageReadyStates.READY) {
|
||||
e.instance.state.readyState = BDFDB.DiscordConstants.ImageReadyStates.READY;
|
||||
BDFDB.ReactUtils.forceUpdate(e.instance);
|
||||
|
|
Loading…
Reference in New Issue