summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2018-10-28 20:14:34 +0100
committerYorhel <git@yorhel.nl>2018-10-28 20:15:49 +0100
commit6b1e8e2830ab702f46967bbd230f589e247bfb08 (patch)
treec9ffc47c75bf2d5c6e7e4946c0f2940c0d8a36b0 /data
parent8de8e1f1d118a7746a033eda9f691c951a5ef022 (diff)
Ignore hidden-by-CSS NSFW images in next/prev in image viewer
Broken in 0687115f99 Fixes https://vndb.org/t2520.277 The JS check is based on https://makandracards.com/makandra/1339-check-whether-an-element-is-visible-or-hidden-with-javascript
Diffstat (limited to 'data')
-rw-r--r--data/js/iv.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/data/js/iv.js b/data/js/iv.js
index 1591cc0a..fa3a6a1d 100644
--- a/data/js/iv.js
+++ b/data/js/iv.js
@@ -50,7 +50,7 @@ function init() {
// Find the next (dir=1) or previous (dir=-1) non-hidden link object for the category.
function findnav(cat, i, dir) {
for(var j=i+dir; j>=0 && j<cats[cat].length; j+=dir)
- if(!hasClass(cats[cat][j], 'hidden'))
+ if(!hasClass(cats[cat][j], 'hidden') && cats[cat][j].offsetWidth > 0 && cats[cat][j].offsetHeight > 0)
return cats[cat][j];
return 0
}