PageSourceSearch

https://silk-avia.com/local/templates/main/js/additional.js?16914940976467

js silk-avia.com collected 2026-10-02 04:39:31 UTC 6,467 bytes, 191 lines download raw bytes

1/******************************************************************************/
2/*                                                                            */
3/*                        https://www.life-style.uz/                          */
4/*                          Developed by LIFE STYLE                           */
5/*                                                                            */
6/******************************************************************************/
7(function () {
8    $(function () {
9        if ($("#user-avatar").length != 0)
10            $("#user-avatar").on("change", function (e) {
11                var name = this.files[0].name;
12                var file = this.files[0];
13                var reader = new FileReader();
14                console.log(reader);
15                reader.onload = function (e) {
16                    var result = e.target.result;
17                    if ($(".user-avatar-img").length != 0) $(".user-avatar-img").attr("src", result);
18                    // $(".user-avatar-img").attr( "alt", name );
19                };
20                reader.readAsDataURL(file);
21            });
22
23        $("#user-avatar").change(function () {
24            if (window.FormData === undefined) {
25                alert("В вашем браузере FormData не поддерживается");
26            } else {
27                var formData = new FormData();
28                formData.append("file", $("#user-avatar")[0].files[0]);
29
30                $.ajax({
31                    type: "POST",
32                    url: "/upload.php",
33                    cache: false,
34                    contentType: false,
35                    processData: false,
36                    data: formData,
37                    dataType: "json",
38                    success: function (msg) {
39                        if (msg.error == "") {
40                            $("#user-avatar").hide();
41                            $("#result").html(msg.success);
42                        } else {
43                            $("#result").html(msg.error);
44                        }
45                    },
46                });
47            }
48        });
49    });
50})(jQuery);
51
52let popUpJob = document.querySelector(".form_result_text");
53
54if (popUpJob) {
55    setTimeout(() => {
56        popUpJob.remove();
57    }, 5000);
58}
59
60function sa_get_country(_this, lang) {
61    $.get(
62        "/local/ajax/country.php",
63        {
64            q: $(_this).val(),
65            l: lang,
66        },
67        function (result) {
68            $("#country_result").html(result).show();
69        }
70    );
71}
72
73document.addEventListener("input", (e) => {
74    let target = e.target.closest('[name="UF_TIP"]');
75
76    if (target) {
77        const radioPassportNode = document.querySelectorAll('[name="UF_TIP"]');
78
79        if (radioPassportNode[1]) {
80            const inputDateBefore = document.querySelector('[name="UF_DATE_ON"]');
81            const inputDateAdd = document.querySelector('[name="UF_DATE_OF"]');
82            const inputDateSeria = document.querySelector('[name="UF_SERIA"]');
83
84            if (radioPassportNode[1].checked) {
85                inputDateBefore.closest(".col-md-4").style.display = "none";
86                inputDateAdd.closest(".col-md-4").classList.add("col-md-6");
87                inputDateSeria.closest(".col-md-4").classList.add("col-md-6");
88            }
89
90            if (radioPassportNode[0].checked) {
91                inputDateBefore.closest(".col-md-4").style.display = "block";
92                inputDateAdd.closest(".col-md-4").classList.remove("col-md-6");
93                inputDateSeria.closest(".col-md-4").classList.remove("col-md-6");
94            }
95        }
96    }
97
98    let target2 = e.target.closest('[name="typepass2"]');
99
100    if (target2) {
101        const radioPassportNode = document.querySelectorAll('[name="typepass2"]');
102
103        if (radioPassportNode[1]) {
104            const inputDateBefore = document.querySelector('[name="date_on"]');
105            const inputDateAdd = document.querySelector('[name="date_of"]');
106            const inputDateSeria = document.querySelector('[name="seriya"]');
107
108            if (radioPassportNode[1].checked) {
109                inputDateBefore.closest(".col-md-4").style.display = "none";
110                inputDateAdd.closest(".col-md-4").classList.add("col-md-6");
111                inputDateSeria.closest(".col-md-4").classList.add("col-md-6");
112            }
113
114            if (radioPassportNode[0].checked) {
115                inputDateBefore.closest(".col-md-4").style.display = "block";
116                inputDateAdd.closest(".col-md-4").classList.remove("col-md-6");
117                inputDateSeria.closest(".col-md-4").classList.remove("col-md-6");
118            }
119        }
120    }
121});
122
123//
124
125function banSerchSend() {
126    const formBooking = document.querySelector("#search-booking");
127    const btnPlacholderSend = document.querySelectorAll(".search-btn-placeholder");
128
129    if (formBooking) {
130        let arr = [];
131
132        const selectFrom = document.querySelector("#select_from");
133        const selectTo = document.querySelector("#select_to");
134        const dateFrom = document.querySelector('[name="date_from"]');
135
136        arr.push(selectFrom, dateFrom, selectTo);
137
138        let filtredField = arr.every((x) => x.value.length > 0);
139
140        if (filtredField) {
141            btnPlacholderSend.forEach((element) => {
142                element.style.display = "none";
143            });
144        }
145    }
146
147    document.addEventListener("click", (e) => {
148        let btn = e.target.closest(".search-btn-placeholder");
149
150        if (btn) {
151        }
152    });
153}
154
155banSerchSend();
156
157if (/Android/i.test(navigator.userAgent)) {
158    const modal = document.querySelector('.android-modal')
159
160    if (modal) {
161        modal.classList.add('active')
162
163        document.addEventListener('click', (e) => {
164            let btn = e.target.closest('.android-modal__close')
165
166            if (btn) {
167				let parent = btn.closest('.android-modal')
168                parent.classList.remove('active')
169            }
170        })
171    }
172}
173
174if (/iPad|iPhone|iPod/.test(navigator.userAgent)) {
175    const modal = document.querySelector('.ios')
176
177    if (modal) {
178        modal.classList.add('active')
179
180        document.addEventListener('click', (e) => {
181            let btn = e.target.closest('.android-modal__close')
182
183            if (btn) {
184				let parent = btn.closest('.android-modal')
185                parent.classList.remove('active')
186            }
187        })
188    }
189}
190
191

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.