PageSourceSearch

https://turismosierradefrancia.es/wp-content/plugins/advanced-gute…/js/gallery.colorbox.init.js?ver=3.7.6

js turismosierradefrancia.es collected 2026-10-01 13:00:58 UTC 2,029 bytes, 51 lines download raw bytes

1jQuery(document).ready(function ($) {
2    var galGroup = 1;
3    var galImage = null;
4    var galClassName = '';
5
6    // Caption overlay image
7    if (parseInt(advgb.imageCaption) === 2) {
8        galClassName = 'advgb_lightbox advgb_caption_overlay';
9    } else {
10        galClassName = 'advgb_lightbox';
11    }
12
13    $('.wp-block-gallery').each(function () {
14        var item = $(this).find('.blocks-gallery-item, .wp-block-image');
15        // Add lightbox for images with Link to: Media file
16        if(item.find('a[href$=".jpg"], a[href$=".png"], a[href$=".gif"], a[href$=".webp"]').length) {
17
18            item.colorbox({
19                title: function () {
20                    if (parseInt(advgb.imageCaption)) {
21                        var imgCap = $(this).find('figcaption').text() || $(this).find('img').attr('alt');
22                        return imgCap;
23                    }
24    
25                    return null;
26                },
27                maxWidth: '90%',
28                maxHeight: '85%',
29                fixed: true,
30                className: galClassName,
31                rel: 'gallery' + galGroup,
32                photo: true,
33                href: function () {
34                    if($(this).find('a').length) {
35                        // Link to: Media File
36                        galImage = $(this).find('a');
37                        if(galImage.attr('href').indexOf('.jpg') > 0 || galImage.attr('href').indexOf('.png') > 0 || galImage.attr('href').indexOf('.gif') > 0 || galImage.attr('href').indexOf('.jpeg') > 0 || galImage.attr('href').indexOf('.webp') > 0) {
38                            return $(this).find('a').attr('href');
39                        }
40                    }
41                },
42                onComplete: function () {
43                    $('.cboxPhoto')
44                        .attr('alt', $(this).find('img').attr('alt'))
45                        .attr('title', $(this).find('img').attr('title'));
46                }
47            });
48            galGroup++;
49        }
50    });
51});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.