PageSourceSearch

https://www.thervgeeks.com/wp-content/cache/min/1/wp-content/plugi…/public-powerkit-lightbox.js?ver=1790104233

js thervgeeks.com collected 2026-09-25 14:33:35 UTC 3,195 bytes, 15 lines download raw bytes

1(function($){$.fn.powerkitLightbox=function(options){var settings=$.extend({gallery:!1,},options);var objSelector=this;var imageSelector=null;var containerSelector=null;var initGallery=[];$(objSelector).each(function(){var id=Math.random().toString(36).substr(2,9);if($(this).is('img')){imageSelector=this}else{imageSelector=$(this).find('img')}
2$(imageSelector).each(function(){var container=$(this).parent();if(!$(container).is('a')){return}
3var imagehref=$(container).attr('href');if(!imagehref.match(/\.(gif|jpeg|jpg|png|webp)/)){return}
4if(!($(container).closest('figure').length)){$(container).wrap('<figure class="pk-lightbox-container"></figure>')}
5if(!$(container).closest('figure').hasClass('pk-lightbox-container')){$(container).closest('figure').addClass('pk-lightbox-container')}
6var imgClasses=['alignnone','aligncenter','alignleft','alignright'];imgClasses.forEach(function(el){if($(container).find('img').hasClass(el)){$(container).find('img').removeClass(el);$(container).find('img').closest('figure').addClass(el);var imgWidth=$(container).find('img').attr('width');if(parseInt(imgWidth)!=='NaN'){$(container).find('img').closest('figure').width(imgWidth)}}});container=$(container).parent();$('> a',container).not('.pk-pin-it').addClass('pk-image-popup');if(powerkit_lightbox_localize.zoom_icon){$('> a',container).not('.pk-pin-it').addClass('pk-zoom-icon-popup')}
7if($(objSelector).is('img')){containerSelector=container}});if(!$(objSelector).is('img')){containerSelector=this}
8if($(containerSelector).is('[data-pk-uuid]')){return}
9$(containerSelector).attr('data-pk-uuid',id);initGallery[id]=GLightbox({loop:settings.gallery,touchNavigation:!0,autoplayVideos:!0,selector:`[data-pk-uuid="${id}"] .pk-image-popup`,});initGallery[id].on('slide_before_load',(data)=>{const{slideIndex,slideNode,slideConfig,player,trigger}=data;let figure=$(trigger).closest('figure');let description=$(figure).find('img').data('lightbox-description')||'';if(!description){description=$(figure).find('.wp-caption-text').text()}
10if(!description){description=$(figure).find('figcaption').text()}
11if(description){slideConfig.title=description}})})};function initPowerkitLightbox(){var excludeSelectors=powerkit_lightbox_localize.exclude_selectors;var imageSelectors=powerkit_lightbox_localize.single_image_selectors;var gallerySelectors=powerkit_lightbox_localize.gallery_selectors
12var filterSelectors=null;var filterPowerkitLightbox=function(){if(filterSelectors){if($(this).closest(filterSelectors).length>0){return!1}}
13return!0}
14$(imageSelectors).imagesLoaded(function(){var exSplit=excludeSelectors.split(',');var glSplit=gallerySelectors.split(',');filterSelectors=exSplit.concat(glSplit).filter(function(value){return!!value}).filter(function(value){return!this[value]&&(this[value]=!0)},Object.create(null)).join(',');$(imageSelectors).filter(filterPowerkitLightbox).powerkitLightbox()});$(gallerySelectors).imagesLoaded(function(){filterSelectors=excludeSelectors;$(gallerySelectors).filter(filterPowerkitLightbox).powerkitLightbox({gallery:!0})})}
15$(document).ready(function(){initPowerkitLightbox();$(document.body).on('post-load image-load',function(){initPowerkitLightbox()})})})(jQuery)

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.