1function rawurldecode(str) { 2 return decodeURIComponent((str + '').replace(/%(?![\da-f]{2})/gi, function() { 3 // PHP tolerates poorly formed escape sequences 4 return '%25'; 5 })); 6} 7 8jQuery(document).ready(function($) { 9 var galleries = $('.ilightbox_gallery'), 10 jetpackGalleries = $('.tiled-gallery'), 11 nextGenGalleries = $('.ngg-galleryoverview'); 12 13 if (galleries.length) { 14 galleries.each(function() { 15 var t = $(this), 16 kid = $('a[source]', t), 17 options = t.data("options") && eval("(" + rawurldecode(t.data("options")) + ")") || {}; 18 kid.iLightBox(options); 19 }); 20 } 21 22 if (jetpackGalleries.length && ILIGHTBOX.jetPack) { 23 jetpackGalleries.each(function() { 24 var t = $(this), 25 kid = $('a', t), 26 options = ILIGHTBOX.options && eval("(" + rawurldecode(ILIGHTBOX.options) + ")") || {}; 27 options.attr = 'source'; 28 kid.each(function(i) { 29 var $this = $(this), 30 $img = $('img', $this), 31 origFile = $img.data('orig-file'); 32 $this.attr('source', origFile); 33 var events = jQuery._data( this, "events" ); 34 if (events && events.click) 35 delete events.click; 36 }); 37 kid.iLightBox(options); 38 }); 39 } 40 41 $(window).load(function() { 42 if (nextGenGalleries.length && ILIGHTBOX.nextGEN) { 43 nextGenGalleries.each(function() { 44 var t = $(this), 45 kid = $('.ngg-gallery-thumbnail a', t), 46 options = ILIGHTBOX.options && eval("(" + rawurldecode(ILIGHTBOX.options) + ")") || {}; 47 kid.each(function(i) { 48 var $this = $(this), 49 title = $this.data('title'), 50 description = $this.data('description'); 51 if (description.length > 0 || title.length > 0) { 52 $this.data('caption', description.length > 0 ? description : title); 53 } 54 if (title.length > 0 && description.length === 0) { 55 $this.data('title', null); 56 } 57 $this[0].onclick = null; 58 var events = jQuery._data( this, "events" ); 59 if (events && events.click) 60 delete events.click; 61 }); 62 kid.iLightBox(options); 63 }); 64 } 65 }); 66 67 $(document).on('click', '.ilightbox_inline_gallery', function() { 68 var t = $(this), 69 slides = t.data("slides") && eval("(" + rawurldecode(t.data("slides")) + ")") || []; 70 options = t.data("options") && eval("(" + rawurldecode(t.data("options")) + ")") || {}; 71 $.iLightBox(slides, options); 72 }); 73});
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.