PageSourceSearch

https://www.vitawebtv.it/wp-content/plugins/email-posts-to-subscri…//inc/email-posts-to-subscribers.js?ver=2.2

js vitawebtv.it collected 2026-10-02 19:09:37 UTC 2,243 bytes, 84 lines download raw bytes

1(function ($) {
2	'use strict';
3	
4	function prepareFormPostData_elp(form, formData) {
5		jQuery.each((form.serializeArray() || {}), function (i, field) {
6			formData['elp_' + field.name] = field.value;
7		});
8		return formData;
9	}
10
11	function loadResponse_elp(response, form) {
12		var status = response.status;
13
14		var message_class = 'success';
15		if(status === 'ERROR') {
16			message_class = 'error';
17		}
18		
19		if(status === 'ERRORBOT') {
20			message_class = 'boterror';
21		}
22
23		var responseText = response['message_text'];
24		var messageContainer = $(form).next('.elp_form_message');
25		messageContainer.attr('class', 'elp_form_message ' + message_class);
26		messageContainer.html(responseText);
27		var esSuccessEvent = { 
28			detail: { 
29						elp_response : message_class, 
30						msg: responseText
31					}, 
32			bubbles: true, 
33			cancelable: true 
34		};
35
36		jQuery(form).trigger('elp_response', [ esSuccessEvent ]);
37	}
38
39	function EmailPostsSubscribersFun(form){
40		var formData = {};
41		formData = prepareFormPostData_elp(form, formData);
42		formData['elp_submit'] = 'submitted';
43		formData['action'] = 'email_posts_subscribers';
44		//alert(formData.toSource());
45		var actionUrl = elp_data.elp_ajax_url;
46		jQuery(form).find('#elp-loading-image').show();
47		$.ajax({
48			type: 'POST',
49			url: actionUrl,
50			data: formData,
51			dataType: 'json',
52			success: function (response) {
53				if( response && typeof response.status !== 'undefined' && (response.status === "SUCCESS" || response.status === "ERRORBOT") ) {
54					jQuery(form).slideUp('slow');
55					jQuery(form).hide();
56				} else {
57					jQuery(form).find('#elp-loading-image').hide();
58				}
59				jQuery(window).trigger('elp_submit.send_response', [jQuery(form) , response]);
60				loadResponse_elp(response, form);
61			},
62			error: function (err) {
63				//alert(err.toSource());
64				//alert(JSON.stringify(err, null, 4));
65				jQuery(form).find('#elp-loading-image').hide();
66				console.log(err, 'error');
67			},
68		});
69
70		return false;
71	}
72
73	$(document).ready(function () {
74		$(document).on('submit', '.elp_form', function (e) {
75			e.preventDefault();
76			var form = $(this);
77			EmailPostsSubscribersFun(form);
78		});
79
80	});
81
82})(jQuery);
83
84

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.