PageSourceSearch

https://loukosterov.ru/wp-content/plugins/shortcodes-ultimate/assets/js/galleries-shortcodes.js?ver=5.0.1

js loukosterov.ru collected 2026-10-04 23:54:52 UTC 3,064 bytes, 95 lines download raw bytes

1jQuery(document).ready(function ($) {
2	// Prepare items arrays for lightbox
3	$('.su-lightbox-gallery').each(function () {
4		var slides = [];
5		$(this).find('.su-slider-slide, .su-carousel-slide, .su-custom-gallery-slide').each(function (i) {
6			$(this).attr('data-index', i);
7			slides.push({
8				src: $(this).children('a').attr('href'),
9				title: $(this).children('a').attr('title')
10			});
11		});
12		$(this).data('slides', slides);
13	});
14	// Enable sliders
15	$('.su-slider').each(function () {
16		// Prepare data
17		var $slider = $(this);
18		// Apply Swiper
19		var $swiper = $slider.swiper({
20			wrapperClass: 'su-slider-slides',
21			slideClass: 'su-slider-slide',
22			slideActiveClass: 'su-slider-slide-active',
23			slideVisibleClass: 'su-slider-slide-visible',
24			pagination: '#' + $slider.attr('id') + ' .su-slider-pagination',
25			autoplay: $slider.data('autoplay'),
26			paginationClickable: true,
27			grabCursor: true,
28			mode: 'horizontal',
29			mousewheelControl: $slider.data('mousewheel'),
30			speed: $slider.data('speed'),
31			calculateHeight: $slider.hasClass('su-slider-responsive-yes'),
32			loop: true
33		});
34		// Prev button
35		$slider.find('.su-slider-prev').click(function (e) {
36			$swiper.swipeNext();
37		});
38		// Next button
39		$slider.find('.su-slider-next').click(function (e) {
40			$swiper.swipePrev();
41		});
42	});
43	// Enable carousels
44	$('.su-carousel').each(function () {
45		// Prepare data
46		var $carousel = $(this),
47			$slides = $carousel.find('.su-carousel-slide');
48		// Apply Swiper
49		var $swiper = $carousel.swiper({
50			wrapperClass: 'su-carousel-slides',
51			slideClass: 'su-carousel-slide',
52			slideActiveClass: 'su-carousel-slide-active',
53			slideVisibleClass: 'su-carousel-slide-visible',
54			pagination: '#' + $carousel.attr('id') + ' .su-carousel-pagination',
55			autoplay: $carousel.data('autoplay'),
56			paginationClickable: true,
57			grabCursor: true,
58			mode: 'horizontal',
59			mousewheelControl: $carousel.data('mousewheel'),
60			speed: $carousel.data('speed'),
61			slidesPerView: ($carousel.data('items') > $slides.length) ? $slides.length : $carousel.data('items'),
62			slidesPerGroup: $carousel.data('scroll'),
63			calculateHeight: $carousel.hasClass('su-carousel-responsive-yes'),
64			loop: true
65		});
66		// Prev button
67		$carousel.find('.su-carousel-prev').click(function (e) {
68			$swiper.swipeNext();
69		});
70		// Next button
71		$carousel.find('.su-carousel-next').click(function (e) {
72			$swiper.swipePrev();
73		});
74	});
75	// Enable lightbox
76	$('.su-lightbox-gallery').on('click', '.su-slider-slide, .su-carousel-slide, .su-custom-gallery-slide', function (e) {
77		e.preventDefault();
78		var slides = $(this).parents('.su-lightbox-gallery').data('slides');
79		$.magnificPopup.open({
80			items: slides,
81			type: 'image',
82			mainClass: 'mfp-img-mobile',
83			gallery: {
84				enabled: true,
85				navigateByImgClick: true,
86				preload: [0, 1],
87				tPrev: su_magnific_popup.prev,
88				tNext: su_magnific_popup.next,
89				tCounter: su_magnific_popup.counter
90			},
91			tClose: su_magnific_popup.close,
92			tLoading: su_magnific_popup.loading
93		}, $(this).data('index'));
94	});
95});

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.