Skip to content

Commit

Permalink
jquery bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
extesy committed Feb 15, 2024
1 parent aac830b commit 497fad7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion js/hoverzoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -3615,7 +3615,7 @@ var hoverZoom = {

// Simulates a mousemove event to force a zoom call
displayPicFromElement:function (el, force) {
if (el.is(':hover') || force) {
if (force) {
hoverZoom.currentLink = el;
$(document).mousemove();
}
Expand Down
4 changes: 3 additions & 1 deletion plugins/reddit.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ hoverZoomPlugins.push({
var src = items
.filter(item => media_metadata[item.media_id].status === 'valid')
.map(item => ['https://i.redd.it/' + item.media_id + '.' + media_metadata[item.media_id].m.substring(6)]);
var img = post.find('a.title,a.thumbnail');
var img = post.find('a.title');
if (img.length === 0)
img = post.find('a.thumbnail');
if (img.length === 0)
img = post;
hoverZoom.prepareLink(img, src);
Expand Down

0 comments on commit 497fad7

Please sign in to comment.