<commit_before>var hoverZoomPlugins = hoverZoomPlugins || [];
hoverZoomPlugins.push({
    name:'Amazon',
    version:'0.2',
    prepareImgLinks:function (callback) {
        var res = [];
        hoverZoom.urlReplace(res,
            'img[src*=".images-amazon.com"]:not([src*="g-ecx.images-amazon.com"]), img[src*=".ssl-images-amazon.com"]:not([src*="g-ecx.ssl-images-amazon.com"]), mg[src*="/img.amazon."], .iv_thumb_image, img[src*="/ciu/"]',
            /_.+\./,
            ''
        );
        callback($(res));
    }
});<commit_msg>Fix for plug-in: Amazon<commit_after>var hoverZoomPlugins = hoverZoomPlugins || [];
hoverZoomPlugins.push({
    name:'Amazon',
    version:'0.3',
    prepareImgLinks:function (callback) {
        var res = [];

        var reFullsize = /(.*)\/(.*?)\.([^\/]*?)\.(gif|jpe?g|png)$/;
        var reReplace = '$1/$2.$4';

        hoverZoom.urlReplace(res,
            'img[src]',
            reFullsize,
            reReplace
        );

        $('[style*=url]').each(function() {
            // extract url from style
            var backgroundImage = this.style.backgroundImage;
            var reUrl = /.*url\s*\(\s*(.*)\s*\).*/i
            backgroundImage = backgroundImage.replace(reUrl, '$1');
            // remove leading & trailing quotes
            var backgroundImageUrl = backgroundImage.replace(/^['"]/, '').replace(/['"]+$/, '');
            var fullsizeUrl = backgroundImageUrl.replace(reFullsize, reReplace);
            if (fullsizeUrl != backgroundImageUrl) {
                var link = $(this);
                if (link.data().hoverZoomSrc == undefined) { link.data().hoverZoomSrc = [] }
                if (link.data().hoverZoomSrc.indexOf(fullsizeUrl) == -1) {
                    link.data().hoverZoomSrc.unshift(fullsizeUrl);
                    res.push(link);
                }
            }
        });

        callback($(res));
    }
});
{'fraction_non_alphanumeric': 0.19137749737118823, 'fraction_numerical': 0.00473186119873817, 'mean_word_length': 2.0350877192982457, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '303397', 'n_tokens_mistral': 590, 'n_tokens_neox': 571, 'n_words': 82}