diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 5f311a111..8f3d0882e 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -6617,7 +6617,7 @@ $.add(d.body, dialog); nodes.thumbs.scrollTop = 0; nodes.current.parentElement.scrollTop = 0; - Gallery.cb.open.call(image ? $("[href='" + (image.href.replace(/https?:/, '')) + "']", Gallery.thumbs) : Gallery.images[0]); + Gallery.cb.open.call(image ? $("[href='" + (image.href.replace(/https?:/, '')) + "']", nodes.thumbs) : Gallery.images[0]); d.body.style.overflow = 'hidden'; return nodes.total.textContent = --i; }, diff --git a/builds/crx/script.js b/builds/crx/script.js index 84211eba2..530f9429a 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -8925,7 +8925,7 @@ $.add(d.body, dialog); nodes.thumbs.scrollTop = 0; nodes.current.parentElement.scrollTop = 0; - Gallery.cb.open.call(image ? $("[href='" + (image.href.replace(/https?:/, '')) + "']", Gallery.thumbs) : Gallery.images[0]); + Gallery.cb.open.call(image ? $("[href='" + (image.href.replace(/https?:/, '')) + "']", nodes.thumbs) : Gallery.images[0]); d.body.style.overflow = 'hidden'; return nodes.total.textContent = --i; }, diff --git a/src/Images/Gallery.coffee b/src/Images/Gallery.coffee index 2b47d65a5..f2f5d7a09 100644 --- a/src/Images/Gallery.coffee +++ b/src/Images/Gallery.coffee @@ -98,7 +98,7 @@ Gallery = nodes.current.parentElement.scrollTop = 0 Gallery.cb.open.call if image - $ "[href='#{image.href.replace /https?:/, ''}']", Gallery.thumbs + $ "[href='#{image.href.replace /https?:/, ''}']", nodes.thumbs else Gallery.images[0]