diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-07-30 21:55:22 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-07-30 21:55:22 -0300 |
commit | c4b6524d51447c388a635c55997d1b5b28ca1ced (patch) | |
tree | da95c9bdc3877bc91a926e2340b651be5741222a /src/static | |
parent | cd35aa4215bec35ee5aee112288e2562b2d7237d (diff) |
client: don't show image overlay for iamges with custom links
Diffstat (limited to 'src/static')
-rw-r--r-- | src/static/client.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/static/client.js b/src/static/client.js index 2f0b6aee..dab92ffc 100644 --- a/src/static/client.js +++ b/src/static/client.js @@ -653,8 +653,12 @@ function addImageOverlayClickHandlers() { return; } - for (const img of document.querySelectorAll('.image-link')) { - img.addEventListener('click', handleImageLinkClicked); + for (const link of document.querySelectorAll('.image-link')) { + if (link.querySelector('img').hasAttribute('data-no-image-preview')) { + continue; + } + + link.addEventListener('click', handleImageLinkClicked); } const actionContainer = document.getElementById('image-overlay-action-container'); |