Skip to content

Commit

Permalink
Merge pull request #566 from GrosPoulet/master
Browse files Browse the repository at this point in the history
New plug-in : free-images.com
  • Loading branch information
GrosPoulet authored Aug 30, 2020
2 parents 42aa971 + d0c5fae commit 974991f
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 6 deletions.
4 changes: 4 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -1392,6 +1392,10 @@
{
"js": ["plugins/fotki.js"],
"matches": ["*://*.fotki.com/*"]
},
{
"js": ["plugins/free_images.js"],
"matches": ["*://*.free-images.com/*"]
}
]
}
16 changes: 16 additions & 0 deletions plugins/free_images.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
var hoverZoomPlugins = hoverZoomPlugins || [];
hoverZoomPlugins.push({
name:'_free-images.com',
version:'0.1',
prepareImgLinks:function (callback) {
var res = [];

hoverZoom.urlReplace(res,
'img[src]',
['/tn/', '/sm/', '/md/', '/lg/'],
['/or/', '/or/', '/or/', '/or/']
);

callback($(res), this.name);
}
});
12 changes: 6 additions & 6 deletions plugins/freeimages.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
var hoverZoomPlugins = hoverZoomPlugins || [];
hoverZoomPlugins.push({
name:'freeimages.com',
version:'0.1',
name:'_freeimages.com',
version:'0.2',
prepareImgLinks:function (callback) {
var res = [];

hoverZoom.urlReplace(res,
'img[src*="freeimages"]',
['/large-thumbs/', '/thumbs/', '/home-grids/'],
['/previews/', '/previews/', '/previews/']
'img[src]',
['/small-thumbs/', '/thumbs/', '/large-thumbs/', '/home-grids/', '/small-previews/', '/previews/'],
['/large-previews/', '/large-previews/', '/large-previews/', '/large-previews/', '/large-previews/']
);

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

0 comments on commit 974991f

Please sign in to comment.