Refine image zoom functionality to skip small icons and enhance hover overlay

This commit is contained in:
interlope committed 2026-05-30 03:26:35 +02:00
1 parent 8831026024
commit f54c05bfbb
2 files changed
+5 -2

No files matched your search

+4 -1
View File
@@ -369,7 +369,10 @@
}
Array.prototype.forEach.call(images, function (el) {
// Wrap in a span so CSS can attach the hover badge via ::after
// Skip icons / tiny images — not worth zooming
if (el.offsetWidth < 80 && el.offsetHeight < 80) return;
// Wrap in a span so CSS can attach the hover overlay via ::after
var wrap = document.createElement('span');
wrap.className = 'zoomable-wrap';
el.parentNode.insertBefore(wrap, el);