PageSourceSearch

https://papasmithfitness.ru/local/templates/papa-smit/components/b…/main-slider/script.js?16621178872771

js papasmithfitness.ru collected 2026-10-04 09:27:17 UTC 2,771 bytes, 76 lines download raw bytes

1(function (window) {
2    'use strict';
3
4    if (window.webMainSlider)
5        return;
6
7    window.webMainSlider = function (idSlider) {
8        this.slideViewed = null;
9        this.errorCode = 0;
10        this.items = 0;
11
12        if (idSlider) {
13            this.slideViewed = document.getElementById(idSlider);
14        }
15
16        if (!this.slideViewed) {
17            this.errorCode = 1;
18        } else {
19            this.items = this.slideViewed.childNodes;
20        }
21
22        if (this.errorCode === 0) {
23            document.addEventListener('DOMContentLoaded', this.init.bind(this));
24            //BX.ready(BX.delegate(this.init, this));
25        } else {
26            console.log({
27                mainSlider: idSlider,
28                errorCode: this.errorCode,
29            });
30        }
31    };
32
33    window.webMainSlider.prototype = {
34        init: function () {
35            if (this.items.length > 1) {
36               
37                this.slideViewed.style.display = 'block';
38                $(this.slideViewed).find('.js-slide.slick-slider').slick('unslick');
39
40                let attrSlider = $(this.slideViewed).attr('data-options');
41                let arrow = false;
42                let infinite = false;
43                let autoplay = false;
44                let autoplaySpeed = false;
45
46                if(!!attrSlider){
47                    attrSlider = JSON.parse($(this.slideViewed).attr('data-options'));
48                    arrow = attrSlider['arrows'] ?? arrow;
49                    infinite = attrSlider['infinite'] ?? infinite;
50                    autoplay = attrSlider['autoplay'] ?? autoplay;
51                    autoplaySpeed = attrSlider['autoplaySpeed'] ?? autoplaySpeed;
52                }
53
54                $(this.slideViewed).find('.js-slide').slick({
55                    slidesToShow: 1,
56                    slidesToScroll: 1,
57                    arrows: arrow,
58                    infinite: infinite,
59                    dots: true, //точечки
60                    autoplay: autoplay,//true,
61                    appendDots: $(this.slideViewed).find('.append-dots'),
62                    autoplaySpeed: autoplaySpeed,
63                    /*responsive: [{
64                        breakpoint: 990,
65                        settings: {
66                            infinite: false,
67                            arrows: true,
68                            nextArrow: '#' + this.slideViewed.getAttribute('id') + ' .js-detmain-next',
69                            prevArrow: '#' + this.slideViewed.getAttribute('id') + ' .js-detmain-prev'
70                        }
71                    }]*/
72                }); // in start page, thumb image
73            }
74        }
75    };
76})(window);

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.