1(function() { 2 var options = { 3 sourceAttr: php_vars.ar_sl_sourceAttr, 4 overlay: (php_vars.ar_sl_overlay == '1') ? true : false, 5 overlayOpacity: parseFloat(php_vars.ar_sl_overlayOpacity), 6 spinner: (php_vars.ar_sl_spinner == '1') ? true : false, 7 nav: (php_vars.ar_sl_nav === '1') ? true : false, 8 navText: [php_vars.ar_sl_navtextPrev,php_vars.ar_sl_navtextNext], 9 captions: (php_vars.ar_sl_caption === '1') ? true : false, 10 captionSelector:php_vars.ar_sl_captionSelector, 11 captionType: php_vars.ar_sl_captionType, 12 captionsData: php_vars.ar_sl_captionData, 13 captionPosition:php_vars.ar_sl_captionPosition, 14 captionDelay: parseInt(php_vars.ar_sl_captionDelay,10), 15 captionClass: php_vars.ar_sl_captionClass, 16 captionHTML: (php_vars.ar_sl_captionHTML === '1') ? true : false, 17 close: (php_vars.ar_sl_close === '1') ? true : false, 18 closeText: php_vars.ar_sl_closeText, 19 showCounter: (php_vars.ar_sl_showCounter === '1') ? true : false, 20 fileExt: (php_vars.ar_sl_fileExt == 'false') ? false : php_vars.ar_sl_fileExt, 21 animationSpeed: parseInt(php_vars.ar_sl_animationSpeed,10), 22 animationSlide: (php_vars.ar_sl_animationSlide === '1') ? true : false, 23 preloading: (php_vars.ar_sl_preloading === '1') ? true : false, 24 enableKeyboard: (php_vars.ar_sl_enableKeyboard === '1') ? true : false, 25 loop: (php_vars.ar_sl_loop === '1') ? true : false, 26 rel: (php_vars.ar_sl_rel == 'false') ? false : php_vars.ar_sl_rel, 27 docClose: (php_vars.ar_sl_docClose === '1') ? true : false, 28 swipeTolerance: parseInt(php_vars.ar_sl_swipeTolerance,10), 29 className: php_vars.ar_sl_className, 30 widthRatio: php_vars.ar_sl_widthRatio, 31 heightRatio: php_vars.ar_sl_heightRatio, 32 scaleImageToRatio: (php_vars.ar_sl_scaleImageToRatio == '1') ? true : false, 33 disableRightClick:(php_vars.ar_sl_disableRightClick == '1') ? true : false, 34 disableScroll: (php_vars.ar_sl_disableScroll == '1') ? true : false, 35 alertError: (php_vars.ar_sl_alertError == '1') ? true : false, 36 alertErrorMessage:php_vars.ar_sl_alertErrorMessage, 37 additionalHtml: php_vars.ar_sl_additionalHtml, 38 history: (php_vars.ar_sl_history == '1') ? true : false, 39 throttleInterval:parseInt(php_vars.ar_sl_throttleInterval,10), 40 doubleTapZoom: parseInt(php_vars.ar_sl_doubleTapZoom,10), 41 maxZoom: parseInt(php_vars.ar_sl_maxZoom,10), 42 htmlClass: php_vars.ar_sl_htmlClass, 43 rtl: (php_vars.ar_sl_rtl == '1') ? true : false, 44 fixedClass: php_vars.ar_sl_fixedClass, 45 fadeSpeed: parseInt(php_vars.ar_sl_fadeSpeed,10), 46 uniqueImages: (php_vars.ar_sl_uniqueImages == '1') ? true : false, 47 focus: (php_vars.ar_sl_focus == '1') ? true : false, 48 scrollZoom: (php_vars.ar_sl_scrollZoom == '1') ? true : false, 49 scrollZoomFactor:parseFloat(php_vars.ar_sl_scrollZoomFactor) 50 } 51 // fixing not working lightbox in some themes 52 var anchors = document.querySelectorAll("a"); 53 if(php_vars.ar_sl_fileExt == 'false') { 54 var thumbnails = []; 55 } else { 56 var fileExt = '\\.('+php_vars.ar_sl_fileExt+')(\\?[^/]*)*$'; 57 var matcher = new RegExp(fileExt, "i"); 58 var thumbnails = Array.from(anchors).filter(function(item) { 59 return matcher.test(item.getAttribute("href")); 60 }); 61 } 62 63 if(thumbnails.length) { 64 for (const thumbnail of thumbnails) { 65 thumbnail.classList.add('simplelightbox'); 66 } 67 } 68 69 if(document.querySelectorAll('a.simplelightbox').length ) { 70 var simplelightbox = new SimpleLightbox('a.simplelightbox', options); 71 } 72 73 if(php_vars.ar_sl_additionalSelectors) { 74 var selectors = php_vars.ar_sl_additionalSelectors.split(','); 75 for(var i = 0; i <= selectors.length; i++) { 76 var selector = selectors[i]; 77 if(selector) { 78 selector = selector.trim(); 79 if(selector != '' && document.querySelectorAll(selector).length) { 80 new SimpleLightbox(selector, options); 81 } 82 } 83 } 84 } 85})();
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.