PageSourceSearch

https://fishretail.ru/1658742196/js/footer/footer2022.js

js fishretail.ru collected 2026-10-02 17:15:31 UTC 2,033 bytes, 46 lines download raw bytes

1// Блок кода для FOOTER
2(function () {
3    "use strict";
4    // события поискового инпута
5    const searchInput = document.querySelector('.js-search-input');
6    if (searchInput) {
7        searchInput.addEventListener('focus', function () {
8            this.placeholder === this.value ? this.value = '' : null;
9            console.log(this.value)
10        });
11        searchInput.addEventListener('blur', function () {
12            !this.value ? this.value = this.placeholder : null;
13        });
14    }
15
16    // Аккордион в футоре
17    const accardions = document.querySelectorAll('.js-accardion');
18    if (accardions.length) {
19        accardions.forEach(accardion => {
20            const accardionItems = accardion.querySelectorAll('.js-accardion-item');
21            const accardionWraps = accardion.querySelectorAll('.js-accardion-wrap');
22            const accardionContents = accardion.querySelectorAll('.js-accardion-content');
23
24            if (accardionItems.length) {
25                accardionItems.forEach((item, itemIndex, list) => {
26                    const accardionBtn = item.querySelector('.js-accardion-btn');
27
28                    if (accardionBtn) {
29                        accardionBtn.addEventListener('click', () => {
30                            let isOpen = item.classList.contains('middle-footer__nav-section--opened');
31                            let wrapHeight = accardionContents[itemIndex].offsetHeight + 'px';
32
33                            list.forEach((el, index) => {
34                                el.classList.remove('middle-footer__nav-section--opened');
35                                accardionWraps[index].style.height = '0';
36                            });
37
38                            item.classList.toggle('middle-footer__nav-section--opened', !isOpen);
39                            accardionWraps[itemIndex].style.height = isOpen ? 0 : wrapHeight;
40                        })
41                    }
42                })
43            }
44        })
45    }
46}());

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.