PageSourceSearch

https://coroklet.ru/wp-content/plugins/read-later-button/public/js/read-later-button-public.js?ver=1.0.0

js coroklet.ru collected 2026-09-29 12:49:26 UTC 3,274 bytes, 113 lines download raw bytes

1(function( $ ) {
2
3	console.log ('loaded');
4	/**
5	 * All of the code for your public-facing JavaScript source
6	 * should reside in this file.
7	 *
8	 * Note: It has been assumed you will write jQuery code here, so the
9	 * $ function reference has been prepared for usage within the scope
10	 * of this function.
11	 *
12	 * This enables you to define handlers, for when the DOM is ready:
13	 *
14	 * $(function() {
15	 *
16	 * });
17	 *
18	 * When the window is loaded:
19	 *
20	 * $( window ).load(function() {
21	 *
22	 * });
23	 *
24	 * ...and/or other possibilities.
25	 *
26	 * Ideally, it is not considered best practise to attach more than a
27	 * single DOM-ready or window-load handler for a particular page.
28	 * Although scripts in the WordPress core, Plugins and Themes may be
29	 * practising this, we should strive to set a better example in our own work.
30	 */
31
32    $(function() {
33
34
35        $('.read-later-button').click (function (e) {
36
37
38
39            if ($(this).text() == $(this).attr('data-showname')) {
40                $(this).text($(this).attr('data-hidename'));
41
42            }
43            else {
44
45                $(this).text($(this).attr('data-showname'));
46            }
47
48            //$(this).closest('.read-later-button-wrapper').next('.read-later-block-wrapper').find('.read-later-services').hide();
49            $(this).closest('.read-later-button-wrapper').next('.read-later-block-wrapper').find('.read-later-services').slideToggle();
50
51
52
53            //$('.time-send-service').slideToggle();
54            return false;
55
56
57        });
58
59        $('.read-later-services .body .mail').click (function (e) {
60            //console.log ('click');
61            $(this).toggleClass('active');
62            $(this).closest('.read-later-services').find('.form-wrap').slideToggle();
63            return false;
64
65		});
66
67        $('form#send_news').submit(function (e) {
68			e.preventDefault();
69			var $form = $(this);
70
71
72            $.ajax({
73                url: wpajax_settings.ajax_url,
74                type: 'POST',
75				dataType: 'json',
76                data: {
77                    'action': 'save_customer_email',
78                    'email': $form.find('[name="email"]').val(),
79                    'captcha': $form.find('[name="captcha_word"]').val(),
80                    'url': $form.find('[name="url"]').val(),
81                    'title': $form.find('[name="title"]').val(),
82
83                },
84                success:function(data) {
85                	if (data.status == 'success') {
86                        $form.find ('[type="submit"]').hide();
87                		$form.find ('.captcha').html(data.message);
88					} else {
89                        console.log('error', data);
90
91                        for (var i in data.errors) {
92
93                        	console.log ('field', data.errors[i].field);
94                            console.log ('message', data.errors[i].message);
95
96                            $form.find('[name="' + data.errors[i].field  + '"]').val('');
97                            $form.find('[name="' + data.errors[i].field  + '"]').attr('placeholder', data.errors[i].message);
98                            $form.find('[name="' + data.errors[i].field  + '"]').addClass('error');
99
100
101                        }
102
103					}
104
105                },
106            });
107
108
109        });
110
111    });
112
113})( jQuery );

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.