Skip to content

Commit

Permalink
Merge pull request #1247 from GrosPoulet/master
Browse files Browse the repository at this point in the history
Fix for ArtStation plug-in (#1241)
  • Loading branch information
GrosPoulet authored Oct 20, 2023
2 parents 3ba44e7 + 87b88f9 commit c6a8527
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions plugins/artstation.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
var hoverZoomPlugins = hoverZoomPlugins || [];
hoverZoomPlugins.push({
name:'artstation.com',
version:'0.1',
version:'0.2',

prepareImgLinks: function (callback) {
const res = [];

hoverZoom.urlReplace(res,
'img[src*="artstation"]',
'img[src]',
/(\/[^0-9]*\/\d+\/\d+\/\d+\/)(\d+\/)?(small|smaller_square|small_square|micro_square|medium|medium_wide|default)\//,
'$1original/',
'a'
);

hoverZoom.urlReplace(res,
'img[src]',
/(\/[^0-9]*\/\d+\/\d+\/\d+\/)(\d+\/)?(small|smaller_square|small_square|micro_square|medium|medium_wide|default)\//,
'$1large/',
'a.project-image'
'a'
);

callback($(res), this.name);
Expand Down

0 comments on commit c6a8527

Please sign in to comment.