PageSourceSearch

https://xn-----dlccfbfdksbbn6ccdrcazo.xn--p1ai/local/templates/main/js/oneclick.js?v=20260805-4

js xn-----dlccfbfdksbbn6ccdrcazo.xn--p1ai collected 2026-10-04 23:53:28 UTC 2,411 bytes, 93 lines download raw bytes

1(function(){
2
3
4
5        (window.openModal = function (e, t, i) {
6            i &&
7            document.querySelectorAll(".modal.show").forEach((e) => {
8                e.classList.remove("show");
9            }),
10            t && (fs[e] = t),
11                document.getElementById(e).classList.add("show");
12        });
13
14
15
16    let currentItem = null;
17
18    function OneClickWatcher(selector)
19    {
20        this.$container = $(selector);
21        this.events();
22    }
23
24    OneClickWatcher.prototype.events = function()
25    {
26        const it = this;
27
28        this.$container.find("#modal-phone3").bind("input", function(){
29            if(this.value.length < 15)
30            {
31                this.setCustomValidity('Некорректный номер');
32            }
33            else
34            {
35                this.setCustomValidity('');
36            }
37        })
38
39        this.$container.find(".js-onelick-submit").bind('click', function(){
40
41            const form = $("#modal-form3")[0];
42            if(!form.checkValidity())
43            {
44                form.reportValidity();
45                return
46            }
47
48
49            bu_ajax.oneclick.create({
50                item_id: currentItem,
51                quantity: 1,
52
53                name: it.$container.find('#modal-name3').val(),
54                email: it.$container.find('#modal-email3').val(),
55                phone: it.$container.find('#modal-phone3').val(),
56
57            }).then(function(resp){
58                window.SiteMetrika?.formSuccess('oneclick_ok', {
59                    product_id: currentItem
60                });
61                console.log(resp.data.answer);
62                $('#thanksOrder').addClass('show');
63
64                $("#thanksOrder ").text(resp.data.answer)
65                window.openModal('thanksOrder', function(){
66                   // location.reload()
67                }, true);
68            })
69
70        });
71    }
72
73    OneClickWatcher.prototype.clearErrors = function()
74    {
75        this.$container.find('.errors').html('');
76    }
77
78    OneClickWatcher.prototype.addError = function(text)
79    {
80        this.$container.find('.errors').append('<p>'+text+'</p>');
81    }
82
83    const oneclickwatcher = new OneClickWatcher("#modalByOneClick");
84
85    window.oneclick = {
86        openItem: function(item_id)
87        {
88            currentItem = item_id;
89            window.openModal('modalByOneClick');
90        }
91    };
92
93})();

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.