PageSourceSearch

https://lickingcountychamber.com/wp-content/plugins/wp-instagram-feed-awplife/js/ifgp-lightbox.js?ver=1.5.1

js lickingcountychamber.com collected 2026-10-04 10:06:41 UTC 12,131 bytes, 202 lines download raw bytes

1jQuery(window).load(function() {
2    jQuery(function($) {
3        var scrollTo = 0;
4        var updateArrows = function() {
5            $('.carouselGallery-right').removeClass('disabled');
6            $('.carouselGallery-left').removeClass('disabled');
7            var curIndex = $('.carouselGallery-carousel.active').data('index');
8            updateArrows.nbrOfItems = updateArrows.nbrOfItems || $('.carouselGallery-carousel').length - 1;
9
10            curIndex === updateArrows.nbrOfItems && $('.carouselGallery-right').addClass('disabled');
11            curIndex === 0 && $('.carouselGallery-left').addClass('disabled');
12        }
13
14        $('.carouselGallery-carousel').on('click', function(e) {
15            scrollTo = $('body').scrollTop();
16            $('body').addClass('noscroll');
17            $('body').css('position', 'fixed');
18            $('.carouselGallery-carousel').removeClass('active');
19            $(this).addClass('active');
20            showModal($(this));
21            updateArrows();
22        });
23
24        $('body').on('click', '.carouselGallery-right, .carouselGallery-left', function(e) {
25            if ($(this).hasClass('disabled')) return;
26            var curIndex = $('.carouselGallery-carousel.active').data('index');
27            var nextItemIndex = parseInt(curIndex + 1);
28            if ($(this).hasClass('carouselGallery-left')) {
29                nextItemIndex -= 2;
30            }
31            var nextItem = $('.carouselGallery-carousel[data-index=' + nextItemIndex + ']');
32
33            if (nextItem.length > 0) {
34                $('.carouselGallery-carousel').removeClass('active');
35                $('.carouselGallery-wrapper').addClass('transitioning');
36                $('.instagram-lightbox-modal, .carouselGallery-modal').addClass('closing');
37
38                setTimeout(function() {
39                    $('body').find('.carouselGallery-wrapper').remove();
40                    showModal(nextItem);
41                    nextItem.addClass('active');
42                }, 250);
43            }
44            updateArrows();
45        });
46
47        var modalHtml = '';
48        var showModal = function(that) {
49            var rawData = {
50                username: that.data('username'),
51                imagedate: that.data('imgdate'),
52                imagetext: that.data('imagetext'),
53                imagepath: that.data('imagepath'),
54                url: that.data('url'),
55                posturl: that.data('posturl')
56            };
57
58            var username = (rawData.username && rawData.username !== 'undefined' && rawData.username !== '') ? rawData.username : ifgp_lightbox_vars.unknown_user;
59            var imagedate = (rawData.imagedate && rawData.imagedate !== 'undefined' && rawData.imagedate !== '') ? rawData.imagedate : ifgp_lightbox_vars.recently;
60            var imagetext = (rawData.imagetext && rawData.imagetext !== 'undefined' && rawData.imagetext !== '') ? rawData.imagetext : ifgp_lightbox_vars.no_caption;
61            var imagepath = (rawData.imagepath && rawData.imagepath !== 'undefined' && rawData.imagepath !== '') ? rawData.imagepath : '';
62            var postURL = (rawData.posturl && rawData.posturl !== 'undefined' && rawData.posturl !== '') ? rawData.posturl : '#';
63
64            var tags = (imagetext && imagetext !== ifgp_lightbox_vars.no_caption) ? imagetext.split('#') : [ifgp_lightbox_vars.no_caption];
65
66            if (jQuery('.carouselGallery-wrapper').length === 0) {
67                if (typeof imagepath !== 'undefined' && imagepath !== '' && imagepath !== null) {
68                    modalHtml = "<div class='carouselGallery-wrapper instagram-lightbox-overlay'>";
69                    modalHtml += "<div class='carouselGallery-modal instagram-lightbox-modal'>";
70                    modalHtml += "<span class='carouselGallery-left instagram-nav-arrow' title='" + ifgp_lightbox_vars.previous + "'><svg width='20' height='20' viewBox='0 0 24 24' fill='none'><path d='M15 18l-6-6 6-6' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg></span>";
71                    modalHtml += "<span class='carouselGallery-right instagram-nav-arrow' title='" + ifgp_lightbox_vars.next + "'><svg width='20' height='20' viewBox='0 0 24 24' fill='none'><path d='M9 18l6-6-6-6' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg></span>";
72                    modalHtml += "<span class='instagram-close-btn' title='" + ifgp_lightbox_vars.close + "'>&times;</span>";
73                    modalHtml += "<div class='instagram-modal-container'>";
74                    modalHtml += "<div class='instagram-content-wrapper'>";
75                    modalHtml += "<div class='instagram-image-section'>";
76                    if (that[0].attributes[1].value == 'VIDEO') {
77                        modalHtml += "<video class='instagram-media' controls>";
78                        modalHtml += "<source src='" + imagepath + "'>";
79                        modalHtml += "</video>";
80                    } else {
81                        modalHtml += "<img class='instagram-media' src='" + imagepath + "' alt='" + ifgp_lightbox_vars.instagram_image + "'>";
82                    }
83                    modalHtml += "</div>";
84                    modalHtml += "<div class='instagram-sidebar'>";
85                    modalHtml += "<div class='instagram-header'>";
86                    modalHtml += "<div class='instagram-user-info'>";
87                    modalHtml += "<div class='instagram-avatar'>";
88                    modalHtml += "<img src='" + ifgp_lightbox_vars.plugin_url + "img/insta-icon.png' alt='User Avatar'>";
89                    modalHtml += "</div>";
90                    modalHtml += "<div class='instagram-username'>";
91                    modalHtml += "<a href='" + postURL + "' target='_blank'>" + username + "</a>";
92                    modalHtml += "</div>";
93                    modalHtml += "</div>";
94                    modalHtml += "<div class='instagram-follow-btn'>";
95                    modalHtml += "<a href='https://www.instagram.com/" + username + "' target='_blank' class='instagram-follow-link'>" + ifgp_lightbox_vars.follow + "</a>";
96                    modalHtml += "</div>";
97                    modalHtml += "</div>";
98                    modalHtml += "<div class='instagram-content'>";
99                    modalHtml += "<div class='instagram-caption'>";
100                    modalHtml += "<span class='instagram-username-caption'><a href='" + postURL + "' target='_blank'>" + username + "</a></span>";
101                    modalHtml += "<span class='instagram-text'>";
102                    if (tags && tags.length > 0) {
103                        for (key in tags) {
104                            if (tags.hasOwnProperty(key)) {
105                                if (key != 0 && tags[key] && tags[key].trim() !== '') {
106                                    var value = tags[key].trim();
107                                    modalHtml += "<a href='https://www.instagram.com/explore/tags/" + value + "' target='_blank' class='instagram-hashtag'>#" + value + "</a> ";
108                                } else if (key == 0 && tags[key] && tags[key].trim() !== '') {
109                                    var value = tags[key].trim();
110                                    modalHtml += value + " ";
111                                }
112                            }
113                        }
114                    }
115                    modalHtml += "</span>";
116                    modalHtml += "</div>";
117                    modalHtml += "</div>";
118                    modalHtml += "<div class='instagram-actions'>";
119                    modalHtml += "<div class='instagram-action-buttons'>";
120                    modalHtml += "<a href='" + postURL + "' target='_blank' class='instagram-action-btn'>";
121                    modalHtml += "<svg width='24' height='24' viewBox='0 0 24 24' fill='none'><path d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>";
122                    modalHtml += "</a>";
123                    modalHtml += "<a href='" + postURL + "' target='_blank' class='instagram-action-btn'>";
124                    modalHtml += "<svg width='24' height='24' viewBox='0 0 24 24' fill='none'><path d='M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>";
125                    modalHtml += "</a>";
126                    modalHtml += "<a href='" + postURL + "' target='_blank' class='instagram-action-btn'>";
127                    modalHtml += "<svg width='24' height='24' viewBox='0 0 24 24' fill='none'><path d='M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/><polyline points='16,6 12,2 8,6' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/><line x1='12' y1='2' x2='12' y2='15' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>";
128                    modalHtml += "</a>";
129                    modalHtml += "</div>";
130                    modalHtml += "<div class='instagram-date'>" + imagedate + "</div>";
131                    modalHtml += "</div>";
132                    modalHtml += "</div></div></div></div>";
133                    $('body').append(modalHtml).addClass('instagram-lightbox-open');
134                }
135            }
136
137            var insta_lightbox_content_data = jQuery('.insta_lightbox_content_data').height();
138            if (insta_lightbox_content_data > 400) {
139                jQuery('.carouselGallery-modal-text').css('overflow-y', 'scroll');
140            }
141        };
142
143        jQuery('body').on('click', '.instagram-lightbox-overlay, .carouselGallery-wrapper', function(e) {
144            if (jQuery(e.target).hasClass('instagram-lightbox-overlay') || jQuery(e.target).hasClass('carouselGallery-wrapper')) {
145                removeModal();
146            }
147        });
148
149        jQuery('body').on('click', '.instagram-close-btn', function(e) {
150            e.preventDefault();
151            e.stopPropagation();
152            removeModal();
153        });
154
155        jQuery('body').on('click', '.carouselGallery-modal .iconscircle-cross', function(e) {
156            e.preventDefault();
157            e.stopPropagation();
158            removeModal();
159        });
160
161        jQuery('body').on('click', '.instagram-lightbox-modal, .carouselGallery-modal', function(e) {
162            e.stopPropagation();
163        });
164
165        jQuery('body').on('dblclick', '.instagram-media', function(e) {
166            e.preventDefault();
167            removeModal();
168        });
169
170        var removeModal = function() {
171            jQuery('.instagram-lightbox-modal, .carouselGallery-modal').addClass('closing');
172            setTimeout(function() {
173                jQuery('body').find('.carouselGallery-wrapper').fadeOut(200, function() {
174                    jQuery(this).remove();
175                });
176            }, 200);
177
178            jQuery('body').removeClass('noscroll instagram-lightbox-open');
179            jQuery('body').css('position', 'static');
180            jQuery('body').animate({
181                scrollTop: scrollTo
182            }, 0);
183        };
184
185        var carouselGalleryScrollMaxHeight = function() {
186            if (jQuery('.carouselGallery-scrollbox').length) {
187                maxHeight = $(window).height() - 100;
188                jQuery('.carouselGallery-scrollbox').css('max-height', maxHeight + 'px');
189            }
190        }
191        jQuery(window).resize(function() {
192            clearTimeout(this.id);
193            this.id = setTimeout(carouselGalleryScrollMaxHeight, 100);
194        });
195        document.onkeydown = function(evt) {
196            evt = evt || window.event;
197            if (evt.keyCode == 27) {
198                removeModal();
199            }
200        };
201    });
202});

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.