PageSourceSearch

http://www.castor.com.br/blog/wp-content/plugins/simple-newsletter-br/js/main.js?ver=4.6.23

js castor.com.br collected 2026-10-06 20:04:54 UTC 1,355 bytes, 68 lines download raw bytes

1$ = jQuery;
2function initSimpleNewsletter(element)
3{
4	$(function() {
5		$(element).submit(function( event ) {
6			event.preventDefault();
7			_this= this;
8
9			loading(_this ,1);
10
11			var posting = $.post( '', $(this).serialize() );
12			posting.done(function(e){
13				e = $.parseJSON(e);
14				if(e.success == '1'){
15					message = '<div class="simplenewsletter-success">'+e.message+'</div>';
16					showSucess(_this,message);
17				}else{
18					$("fieldset.simplenewsleter-field span").remove();
19					$.each(e.message,function(field, error) {
20						$(element).find(".simplenewsleter-field-"+field).append('<span class="error">'+error+'</span>');
21					});
22
23				}
24				loading(_this,0);			
25			});
26		});
27	});
28}
29
30function showSucess(element, message)
31{
32	var showon = $(element).parent().data('showon');
33	$(element).find('.error').remove();
34
35	switch(showon){
36		case 'append':
37			$(element).parent().append(message);
38			return 0;
39		break;
40
41		case 'prepend':
42			$(element).parent().prepend(message);
43			return 0;
44		break;
45
46		case 'substitute':
47		default:
48			$(element).parent().html(message);
49			return 0;
50		break;
51	}
52	
53}
54
55function loading(element, method)
56{
57	if(method == 0)
58	{
59		$(element).show();
60		$(element).parent().find('.simplenewsletter_spinner').hide();
61		return 0;
62	}
63	
64	$(element).hide();
65	$(element).parent().find('.simplenewsletter_spinner').show();
66	return 0;
67
68}

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.