Skip to content

Commit

Permalink
Fix for plug-in: e621 (extesy#1397)
Browse files Browse the repository at this point in the history
  • Loading branch information
GrosPoulet committed Aug 24, 2024
1 parent ee870e0 commit 78cac82
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions plugins/e621.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
var hoverZoomPlugins = hoverZoomPlugins || [];
hoverZoomPlugins.push({
name:'e621',
version:'0.3',
version:'0.4',
prepareImgLinks:function (callback) {
var res = [];

// use data-file-url attribute if available
$('[data-file-url]').each(function () {
var _this = $(this);
var img = _this.find('img');
img.data().hoverZoomSrc = [_this.attr('data-file-url')];
res.push(img);
var link = _this.find('a');
if (link.length) {
link.data().hoverZoomSrc = [_this.attr('data-file-url')];
res.push(link);
}
});

// some guessing is still needed when no data-file-url attribute is available
Expand Down

0 comments on commit 78cac82

Please sign in to comment.