PageSourceSearch

https://motocykl-praha.cz/wp-content/plugins/abf-custom-blocks/src/js/virtual-guide.js?ver=1790409607

js motocykl-praha.cz collected 2026-09-26 15:24:48 UTC 1,540 bytes, 39 lines download raw bytes

1/**
2 * Virtuální průvodce — volitelný rozbalovací seznam prostor (1.9.7).
3 *
4 * Bez zapnutého přepínače se všechny Matterport iframy vykreslí naráz jako dřív.
5 * Se zapnutým je stránka kratší a prohlídky se nestahují předem. Karty jsou teď zavřené a iframe se načte až při prvním
6 * rozbalení — proto má v markupu `data-src` místo `src`.
7 */
8(function () {
9    'use strict';
10
11    if (window.abfVirtualGuideLoaded) return;
12    window.abfVirtualGuideLoaded = true;
13
14    function setExpanded(button, expanded) {
15        var card = button.closest('.prohlidka-card');
16        var wrap = card ? card.querySelector('.matterport-wrapper') : null;
17        if (!wrap) return;
18
19        button.setAttribute('aria-expanded', expanded ? 'true' : 'false');
20        wrap.hidden = !expanded;
21        card.classList.toggle('is-open', expanded);
22
23        var frame = expanded ? wrap.querySelector('iframe[data-src]') : null;
24        if (frame) {
25            // Až teď — jinak by se prohlídka stahovala i nerozbalená.
26            // Při zavření `src` necháváme: podruhé se otevře okamžitě a z cache.
27            frame.src = frame.getAttribute('data-src');
28            frame.removeAttribute('data-src');
29        }
30    }
31
32    document.addEventListener('click', function (e) {
33        var button = e.target.closest ? e.target.closest('.prohlidka-toggle') : null;
34        if (!button) return;
35
36        e.preventDefault();
37        setExpanded(button, button.getAttribute('aria-expanded') !== 'true');
38    });
39})();

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.