1(function ($, Drupal, drupalSettings) { 2 3 "use strict"; 4 5 Drupal.behaviors.magnific_popup = { 6 attach: function (context, settings) { 7 // Gallery. 8 $(once('mfp-processed', '.mfp-all-items, .mfp-first-item, .mfp-random-item', context)).each( function() { 9 const verticalFit = $(this).attr('data-vertical-fit') === undefined || $(this).attr('data-vertical-fit') === 'true' ? true : false; 10 $(this).magnificPopup({ 11 delegate: 'a', 12 type: 'image', 13 gallery: { 14 enabled: true 15 }, 16 image: { 17 verticalFit: verticalFit, 18 titleSrc: function (item) { 19 return item.img.attr('alt') || ''; 20 } 21 } 22 }); 23 }); 24 25 // Separate items. 26 $(once('mfp-processed', '.mfp-separate-items', context)).each(function () { 27 const verticalFit = $(this).attr('data-vertical-fit') === undefined || $(this).attr('data-vertical-fit') === 'true' ? true : false; 28 $(this).magnificPopup({ 29 delegate: 'a', 30 type: 'image', 31 image: { 32 verticalFit: verticalFit, 33 titleSrc: function (item) { 34 return item.img.attr('alt') || ''; 35 } 36 } 37 }); 38 }); 39 } 40 }; 41 42})(jQuery, Drupal, drupalSettings);
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.