Skip to content

Commit

Permalink
Fix: Github user images not zooming (#1463)
Browse files Browse the repository at this point in the history
* Fix: Github user images not zooming

* Remove unnecessary 'addClass'
  • Loading branch information
LiliaDoe authored Nov 11, 2024
1 parent 2bde72b commit fcd74da
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions plugins/github.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ hoverZoomPlugins.push({
res.push(img);
});

$('img[src*="private-user-images"]').each(function () {
$('img[src*="user-images"]').one('mouseover', function () {
let img = $(this);
img.data('hoverZoomSrc', [img.attr('src')]);
res.push(img);
let src = img.attr('src');

hoverZoom.prepareLink(img, src)
});

hoverZoom.urlReplace(res,
'a[href*="/blob/"]',
/\/github.com\/(.*)\/blob\/(.*\.(jpg|png|gif))/,
Expand Down

0 comments on commit fcd74da

Please sign in to comment.