diff --git a/plugins/github.js b/plugins/github.js index c01da1477..babf51b43 100644 --- a/plugins/github.js +++ b/plugins/github.js @@ -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))/,