Update ImageUtilities.plugin.js

This commit is contained in:
Mirco Wittrien 2022-12-16 19:22:48 +01:00 committed by GitHub
parent 02001abeb1
commit cc2492d7b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@
* @name ImageUtilities
* @author DevilBro
* @authorId 278543574059057154
* @version 5.0.6
* @version 5.0.7
* @description Adds several Utilities for Images/Videos (Gallery, Download, Reverse Search, Zoom, Copy, etc.)
* @invite Jx3TjNS
* @donate https://www.paypal.me/MircoWittrien
@ -1189,9 +1189,9 @@ module.exports = (_ => {
BDFDB.ReactUtils.forceUpdate(e.instance);
}
}
if (e.methodname == "componentDidUpdate") {
if (BDFDB.ReactUtils.findOwner(BDFDB.ReactUtils.getInstance(e.node), {name: "ImageModal", up: true})) {
if (e.node.querySelector("video") && !BDFDB.LibraryStores.AccessibilityStore.useReducedMotion) e.node.style.setProperty("pointer-events", "none");
if (this.settings.viewerSettings.zoomMode && e.node.querySelector("img") && !e.node._zoomListenerAdded && !e.node.querySelector("video") && !BDFDB.DOMUtils.containsClass(e.node.parentElement, BDFDB.disCN._imageutilitiessibling) && BDFDB.ReactUtils.findOwner(BDFDB.ReactUtils.getInstance(e.node), {name: "ImageModal", up: true})) {
if (this.settings.viewerSettings.zoomMode && e.node.querySelector("img") && !e.node._zoomListenerAdded && !e.node.querySelector("video") && !BDFDB.DOMUtils.containsClass(e.node.parentElement, BDFDB.disCN._imageutilitiessibling)) {
e.node._zoomListenerAdded = true;
e.node.style.setProperty("cursor", "zoom-in");
e.node.addEventListener("mousedown", event => {