PageSourceSearch

https://stavrosdecor.com/local/templates/wedev/js/card-fast-order.js?ver=4.2.72

js stavrosdecor.com collected 2026-10-04 09:11:13 UTC 2,109 bytes, 77 lines download raw bytes

1(function () {
2    var FORM = '#fast-call-card-form';
3    var MODAL = '#fast-call-card-modal';
4    var HIDE = '#hide-fast-call-form';
5
6    var current = null;
7
8    function open(node) {
9        current = {
10            id: node.getAttribute('data-id') || '',
11            name: node.getAttribute('data-name') || '',
12            url: node.getAttribute('data-url') || ''
13        };
14
15        var modal = document.querySelector(MODAL);
16
17        if (modal && typeof window.show === 'function') {
18            window.show(modal);
19        }
20    }
21
22    function pick(event) {
23        return event.target && event.target.closest ? event.target.closest('.card-fast-order') : null;
24    }
25
26    document.addEventListener('click', function (event) {
27        var node = pick(event);
28
29        if (!node) {
30            return;
31        }
32
33        event.preventDefault();
34        event.stopPropagation();
35        open(node);
36    });
37
38    document.addEventListener('keydown', function (event) {
39        if (event.key !== 'Enter' && event.key !== ' ') {
40            return;
41        }
42
43        var node = pick(event);
44
45        if (!node) {
46            return;
47        }
48
49        event.preventDefault();
50        event.stopPropagation();
51        open(node);
52    });
53
54    document.addEventListener('DOMContentLoaded', function () {
55        if (!document.querySelector('.card-fast-order')) {
56            return;
57        }
58
59        if (document.getElementById('show-fast-call-form')) {
60            return;
61        }
62
63        if (!window.backform || !document.querySelector(FORM)) {
64            return;
65        }
66
67        new window.backform('CARD_FAST_ORDER_FORM', FORM, {
68            popup: { btnHide: HIDE, modal: MODAL },
69            onPrepare: function (formData) {
70                formData.append('PRODUCT_NAME', current && current.name ? current.name : 'Отсутствует');
71                formData.append('PRODUCT_URL', current && current.url ? location.origin + current.url : '');
72                formData.append('QUANTITY', '1');
73                formData.append('SOURCE', 'catalog');
74            }
75        });
76    });
77})();

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.