Skip to content

Commit

Permalink
Add support for freeimagehost, fixes #1222
Browse files Browse the repository at this point in the history
  • Loading branch information
extesy committed Aug 26, 2023
1 parent d6a93e3 commit 283f660
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
4 changes: 4 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -1987,6 +1987,10 @@
{
"js": ["plugins/anilist.js"],
"matches": ["*://*.anichart.net/*", "*://*.anilist.co/*"]
},
{
"js": ["plugins/freeimagehost.js"],
"matches": ["*://*.freeimage.host/*"]
}
]
}
18 changes: 18 additions & 0 deletions plugins/freeimagehost.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
var hoverZoomPlugins = hoverZoomPlugins || [];
hoverZoomPlugins.push({
name:'Freeimage Host',
version:'1.0',
prepareImgLinks:function (callback) {
var res = [];

// thumbnail: https://iili.io/HyzgrgI.md.jpg
// fullsize: https://iili.io/HyzgrgI.jpg
hoverZoom.urlReplace(res,
'img[src]',
'.md.',
'.'
);

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

0 comments on commit 283f660

Please sign in to comment.