Skip to content

Commit

Permalink
Fix: Rule34 videos not loading (#1444)
Browse files Browse the repository at this point in the history
* Plugin fix: Rule34 videos not working

* Update version number
  • Loading branch information
LiliaDoe authored Nov 1, 2024
1 parent f0a064a commit b4414fa
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions plugins/paheal.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
var hoverZoomPlugins = hoverZoomPlugins || [];
hoverZoomPlugins.push({
name:'Paheal.net',
version:'0.1',
version:'0.2',
prepareImgLinks:function (callback) {
var res = [];
hoverZoom.urlReplace(res,
'img[src*="thumbs"]',
['thumbs', 'thumbs'],
['images', 'images']
);
let res = [];

$('img[src*="thumbs"]').each(function() {
let img = $(this);
let src = 'https://rule34.paheal.net' + img.attr('src');

src = src.replace('thumbs', 'images').replace('thumb', 'image').replace(/jpg$/, '');
img.data().hoverZoomSrc = [src + 'jpg', src + 'mp4'];
res.push(img);
});

callback($(res), this.name);
}
});

0 comments on commit b4414fa

Please sign in to comment.