PageSourceSearch

https://xlscout.ai/wp-content/plugins/subscribe-to-unlock-lite//js/stul-frontend.js?ver=1.3.1

js xlscout.ai collected 2026-10-05 13:20:20 UTC 6,069 bytes, 149 lines download raw bytes

1
2jQuery(document).ready(function ($) {
3    "use strict";
4    function stul_unlock_by_js() {
5        if ($('.stul-popup-innerwrap').length > 0 && stul_getCookie('stul_unlock_check') == 'yes') {
6            $('.stul-popup-innerwrap').remove();
7        }
8        if ($('.stul-lock-content').length > 0 && stul_getCookie('stul_unlock_check') == 'yes') {
9            $('.stul-lock-content').show();
10        }
11        if ($('.stul-blur-overlay').length > 0 && stul_getCookie('stul_unlock_check') == 'yes') {
12            $('.stul-blur-overlay').remove();
13            $('.stul-content-locked').removeClass('stul-content-locked');
14        }
15    }
16    stul_unlock_by_js();
17    var countdown_timer = '';
18
19    function stul_setCookie(cname, cvalue, exdays) {
20        var d = new Date();
21        d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
22        var expires = "expires=" + d.toUTCString();
23        document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
24        return true;
25    }
26
27    function stul_getCookie(cname) {
28        var name = cname + "=";
29        var decodedCookie = decodeURIComponent(document.cookie);
30        var ca = decodedCookie.split(';');
31        for (var i = 0; i < ca.length; i++) {
32            var c = ca[i];
33            while (c.charAt(0) == ' ') {
34                c = c.substring(1);
35            }
36            if (c.indexOf(name) == 0) {
37                return c.substring(name.length, c.length);
38            }
39        }
40        return "";
41    }
42
43    function closePageLockPopup() {
44        if ($('.stul-countdown-popup').length > 0) {
45            $('.stul-countdown-popup').fadeOut(500);
46        }
47    }
48    /**
49     * Form Submission
50     * 
51     * @since 1.0.0
52     */
53    $('body').on('submit', '.stul-subscription-form', function (e) {
54        e.preventDefault();
55        var selector = $(this);
56        var form_alias = $(this).data('form-alias');
57        var form_data = $(this).serialize();
58        $.ajax({
59            type: 'post',
60            url: stul_frontend_obj.ajax_url,
61            data: {
62                form_data: form_data,
63                _wpnonce: stul_frontend_obj.ajax_nonce,
64                action: 'stul_form_process_action',
65                form_alias: form_alias
66            },
67            beforeSend: function (xhr) {
68                selector.find('.stul-form-message').slideUp(500);
69                selector.find('.stul-form-loader-wraper').show();
70            },
71            success: function (res) {
72                selector.find('.stul-form-loader-wraper').hide();
73                res = $.parseJSON(res);
74                if (res.status == 200) {
75                    selector[0].reset();
76                    if (res.verification_type != 'none') {
77                        if (res.verification_type == 'link') {
78                            selector.find('.stul-form-message').removeClass('stul-error').addClass('stul-success').html(res.message).slideDown(500);
79                        } else {
80                            selector.hide();
81                            selector.parent().find('.stul-unlock-form-wrap').show().data('unlock-key', res.unlock_key);
82                        }
83                    } else {
84                        selector.closest('.stul-main-outer-wrap').find('.stul-blur-overlay').fadeOut(200, function () {
85                            selector.closest('.stul-main-outer-wrap').removeClass('stul-content-locked').addClass('stul-content-unlocked');
86                            selector.closest('.stul-main-outer-wrap').find('.stul-lock-content').show();
87                            stul_setCookie('stul_unlock_check', 'yes', 365);
88                            closePageLockPopup();
89                            $(this).remove();
90                        });
91                    }
92                } else {
93                    selector.find('.stul-form-message').removeClass('stul-success').addClass('stul-error').html(res.message).slideDown(500);
94                }
95            }
96        });
97    });
98
99    $('body').on('click', '.stul-unlock-button', function () {
100        var selector = $(this);
101        var unlock_key = $(this).closest('.stul-unlock-form-wrap').data('unlock-key');
102        var unlock_code = $(this).closest('.stul-unlock-form-wrap').find('.stul-unlock-code-field').val();
103        unlock_code = unlock_code.trim();
104        if (unlock_key == unlock_code) {
105            $(this).closest('.stul-main-outer-wrap').find('.stul-blur-overlay').fadeOut(500, function () {
106                selector.closest('.stul-main-outer-wrap').removeClass('stul-content-locked').addClass('stul-content-unlocked');
107                if (!selector.closest('.stul-main-outer-wrap').find('.stul-lock-content').is(':visible')) {
108                    selector.closest('.stul-main-outer-wrap').find('.stul-lock-content').show();
109                }
110                stul_setCookie('stul_unlock_check', 'yes', 365);
111                stul_setCookie('stul_unlock_check', 'yes', 365);
112                closePageLockPopup();
113                $.ajax({
114                    type: 'post',
115                    url: stul_frontend_obj.ajax_url,
116                    data: {
117                        unlock_key: unlock_key,
118                        _wpnonce: stul_frontend_obj.ajax_nonce,
119                        action: 'stul_verify_status_action'
120                    },
121                    success: function (res) {
122
123                    }
124                });
125                $(this).remove();
126            });
127        } else {
128            $(this).next('.stul-unlock-error-message').show();
129        }
130    });
131
132    /**
133     * 
134     * Seconds countdown timer
135     */
136    if ($('.stul-countdown-number').length > 0) {
137        countdown_timer = setInterval(function () {
138            var seconds = $('.stul-countdown-number').html();
139            var new_second = seconds - 1;
140            if (new_second == 0) {
141                clearInterval(countdown_timer);
142                closePageLockPopup();
143            } else {
144                $('.stul-countdown-number').html(new_second);
145            }
146        }, 1000);
147    }
148
149});

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.