« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/static/client.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/static/client.js')
-rw-r--r--src/static/client.js8
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');