PageSourceSearch

https://ironmac-kompressor.com/local/templates/ironmac/js/common.js?v=1750771115

js ironmac-kompressor.com collected 2026-10-06 06:16:21 UTC 4,271 bytes, 130 lines download raw bytes

1function loadLazySlider(swiper) {
2    var sliderLazyDelayed;
3    var slider = $(swiper.el).parent();
4    var sliderLazy = slider.find(".b-lazy:not(.b-lazy-delayed):not(.b-lazy-loaded)").lazy({
5        defaultImage: "",
6        chainable: false,
7        visibleOnly: true,
8        effect: "fadeIn",
9        effectTime: 500,
10        threshold: 200,
11        beforeLoad: function(element){
12            element.css("display", "");
13        },
14        afterLoad: function(element) {
15            element.css("display", "");
16            element.addClass("b-lazy-loaded");
17        }
18    });
19
20    swiper.on('beforeSlideChangeStart', function() {
21        console.log('beforeSlideChangeStart');
22        var sliderDelayedImages = slider.find(".b-lazy-delayed:not(.b-lazy-loaded)");
23        if (sliderDelayedImages.length) {
24            sliderLazyDelayed = slider.find(".b-lazy-delayed:not(.b-lazy-loaded)").lazy({
25                defaultImage: "",
26                chainable: false,
27                visibleOnly: true,
28                effect: "fadeIn",
29                effectTime: 500,
30                threshold: 200,
31                beforeLoad: function(element){
32                    element.css("display", "");
33                },
34                afterLoad: function(element) {
35                    element.css("display", "");
36                    element.addClass("b-lazy-loaded");
37                }
38            });
39            sliderLazyDelayed.update();
40        }
41
42        sliderLazy.update();
43
44        var remainedSlides = slider.find(".b-lazy:not(.b-lazy-loaded):not(.b-lazy-delayed)");
45        if (remainedSlides.length > 0) {
46            sliderLazy.force(remainedSlides);
47        }
48
49        var remainedDelayedSlides = slider.find(".b-lazy-delayed:not(.b-lazy-loaded)");
50        if (remainedDelayedSlides.length > 0) {
51            sliderLazyDelayed.force(remainedDelayedSlides);
52        }
53    });
54}
55
56
57$(document).ready(function () {
58
59    $(document).on('click', '.js-form [type="submit"]', function() {
60        var form = $(this).closest('form'),
61            input = form.find('input[name="recaptcha_token"]');
62        if (!input.length) {
63            $('<input>').attr('type', 'hidden')
64                .attr('name', 'recaptcha_token')
65                .appendTo(form);
66            input = form.find('input[name="recaptcha_token"]');
67        }
68        if (typeof(window.recaptcha) !== 'undefined') {
69            input.attr('value', window.recaptcha.getToken());
70        } else {
71            console.error('window.recaptcha is undefined');
72        }
73    });
74});
75
76
77if (typeof(waitForElm) === 'undefined') {
78    function waitForElm(selector) {
79        return new Promise(resolve => {
80            if (document.querySelector(selector)) {
81                return resolve(document.querySelector(selector));
82            }
83
84            const observer = new MutationObserver(mutations => {
85                if (document.querySelector(selector)) {
86                    resolve(document.querySelector(selector));
87                    observer.disconnect();
88                }
89            });
90
91            observer.observe(document.body, {
92                childList: true,
93                subtree: true
94            });
95        });
96    }
97}
98
99//goal anyform form__message form__message_success
100if (typeof(setWatchingGoalAllForm) === 'undefined') {
101    function setWatchingGoalAllForm(metrika_id) {
102        waitForElm('.form__message.form__message_success').then(() => {
103            if (typeof (ym) === "function") {
104                ym(metrika_id, 'reachGoal', 'allForm');
105                console.log('event: ym(' + metrika_id + ', "reachGoal", "allForm")');
106            } else {
107                console.log('error: ym undefined');
108            }
109
110            setTimeout(function () {
111                //remove success message and reinit
112                $('.form__message.form__message_success').remove();
113                setWatchingGoalAllForm(metrika_id);
114            }, 5000);
115        });
116    }
117}
118
119if (window.location.hostname === 'ironmac-kompressor.kz') {
120    setWatchingGoalAllForm(96725484);
121}
122
123if (window.location.hostname === 'ironmac-kompressor.com') {
124    setWatchingGoalAllForm(87435737);
125}
126
127if (window.location.hostname === 'ironmac-kompressor.by') {
128    setWatchingGoalAllForm(96725435);
129}
130

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.