PageSourceSearch

https://uarmprotection.com/wp-content/themes/uarm-v2/js/ajax/esputnik.js

js uarmprotection.com collected 2026-10-02 21:36:18 UTC 3,097 bytes, 79 lines download raw bytes

1$(document).ready(function () {
2    var ajaxurl = '/wp-admin/admin-ajax.php';
3
4    $(document).on('submit', '.esputnikForm', function (e) {
5        e.preventDefault();
6
7        var $form = $(e.currentTarget),
8            data = $form.serialize(),
9            email = $form.find('input[name=email]').val();
10        if ($form[0].classList.contains('black-friday-form')) {
11            $form[0].querySelector('.btn--black-friday').classList.add('disabled')
12        }
13
14        $.ajax({
15            url: ajaxurl,
16            data: data,
17            method: $form.attr('method'),
18            success: function () {
19                if (!$form.parents('#thankYouForOrder').length && !$form.parents('#thankYouForOrder').length && typeof openSuccessfulSubscribePopup != 'undefined') {
20                    openSuccessfulSubscribePopup();
21                } else {
22                    $form.find('.inputWrap,.inputButtonWrap').hide();
23                    $form.find('.successText').show();
24                }
25                if ($form[0].classList.contains('black-friday-form')) {
26                    $form[0].querySelector('.black-friday-form__container').classList.add('none')
27                    $form[0].querySelector('.h2').classList.remove('mb-10')
28                    $form[0].querySelector('.h2').innerHTML = 'Thank you for your subscription!'
29                }
30
31                $form[0].reset();
32            },
33            error: function () {
34                console.log($form, $form.classList, this)
35                if ($form[0].classList.contains('black-friday-form')) {
36                    $form[0].querySelector('.black-friday-form__container').classList.add('none')
37                    $form[0].querySelector('.h2').classList.remove('mb-10')
38                    $form[0].querySelector('.h2').innerHTML = 'Thank you for your subscription!'
39                }
40
41            }
42        });
43
44        if (typeof eS != 'undefined') {
45            eS('sendEvent', 'CustomerData', {
46                'CustomerData': {
47                    'user_email': email
48                }
49            });
50        }
51
52        $.cookie('ga_user_id', $form.find('input[name=email]').val(), {expires: 365, path: '/'});
53        window.dataLayer = window.dataLayer || [];
54        window.dataLayer.push({'userid': email});
55
56        return false;
57    });
58
59    if (typeof carrotquest != 'undefined') {
60        carrotquest.onReady(function () {
61            carrotquest.addCallback('event_tracked', function (data) {
62                if (data.event == 'BF: Popup subscribed') {
63                    $.ajax({
64                        url: ajaxurl,
65                        data: {
66                            action: 'uarm_carrot_to_esputnik',
67                            carrot_id: carrotquest.data.user.id,
68                            groups: 'Black Friday 2021',
69                            formType: 'BF21pop_up'
70                        },
71                        method: 'POST',
72                        success: function (data) {
73                        }
74                    });
75                }
76            });
77        });
78    }
79});

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.