PageSourceSearch

https://niigb.ru/bitrix/components/sprint.editor/blocks/templates/.default/_script.js

js niigb.ru collected 2026-10-02 06:49:26 UTC 934 bytes, 22 lines download raw bytes

1/* Общие скрипты для блоков */
2
3/*accordion*/
4document.addEventListener("DOMContentLoaded", function (e) {
5    let titles = document.getElementsByClassName("sp-accordion-title");
6    for (let titleIndex = 0; titleIndex < titles.length; titleIndex++) {
7        if (!titles[titleIndex].classList.contains('sp-accordion__initialized')) {
8            titles[titleIndex].classList.add('sp-accordion__initialized');
9            titles[titleIndex].addEventListener("click", function () {
10                let panel = this.nextElementSibling;
11                if (panel.style.display === "block") {
12                    this.classList.remove("sp-accordion-title__active");
13                    panel.style.display = "none";
14                } else {
15                    this.classList.add("sp-accordion-title__active");
16                    panel.style.display = "block";
17                }
18            });
19        }
20    }
21});
22

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.