PageSourceSearch

https://forvardmebel.ru/local/templates/forvadmebel/javascript/other.js?17888627672308

js forvardmebel.ru collected 2026-10-05 00:05:03 UTC 2,308 bytes, 61 lines download raw bytes

1$(document).ready(function () {
2    if ($("a").hasClass("imagepopup")) {
3        $("a.imagepopup").each(function () {
4            const $link = $(this);
5            if (!$link.attr("data-fancybox")) {
6                $link.attr("data-fancybox", "gallery");
7            }
8        });
9    }
10
11    document.addEventListener("DOMContentLoaded", () => {
12        const properties = document.querySelectorAll(".basket-item-property-name");
13        let foundFirst = false;
14
15        properties.forEach((el) => {
16            if (el.textContent.trim() === "Цвет товара") {
17                if (foundFirst) {
18                    // Если один уже нашли, скрываем этот и все следующие дубликаты
19                    el.style.display = "none";
20
21                    // Если нужно скрыть не только текст, но и весь его родительский блок,
22                    // раскомментируйте строку ниже вместо строки выше:
23                    // el.closest('.basket-item-property-wrapper')?.remove();
24                } else {
25                    foundFirst = true; // Запомнили, что первый элемент мы оставили
26                }
27            }
28        });
29    });
30});
31
32document.addEventListener("DOMContentLoaded", function () {
33    var iframes = document.querySelectorAll("iframe[id^='vk-video']");
34
35    if (iframes.length === 0 || typeof VK === "undefined") return;
36
37    iframes.forEach(function (iframe, index) {
38        var player = VK.VideoPlayer(iframe);
39        var playing = true;
40
41        var parentDiv = iframe.closest(".video-container");
42        if (!parentDiv) return;
43
44        var mainOverlay = parentDiv.querySelector(".vk-overlay-main");
45        var leftOverlay = parentDiv.querySelector(".vk-overlay-controls");
46
47        function togglePlay(e) {
48            e.preventDefault();
49            if (playing) {
50                player.pause();
51            } else {
52                player.play();
53            }
54            playing = !playing;
55            return false;
56        }
57
58        if (mainOverlay) mainOverlay.addEventListener("click", togglePlay);
59        if (leftOverlay) leftOverlay.addEventListener("click", togglePlay);
60    });
61});

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.