From 87b88f9f1c83f8cf272e7e40fe1d8ca4952e6791 Mon Sep 17 00:00:00 2001 From: GrosPoulet Date: Fri, 20 Oct 2023 11:36:13 +0200 Subject: [PATCH] Fix for ArtStation plug-in (#1241) --- plugins/artstation.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/plugins/artstation.js b/plugins/artstation.js index 33cac1b93..df3e060df 100644 --- a/plugins/artstation.js +++ b/plugins/artstation.js @@ -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);