PageSourceSearch

https://ppcexpo.com/blog/wp-content/themes/polyvistablog/js/subscribe.js

js ppcexpo.com collected 2026-09-24 09:23:18 UTC 4,538 bytes, 144 lines download raw bytes

1function subscription_save(){
2var email;
3var isOK;
4var isRight;
5var checkEmail=$('.txt_subscribe_right_main')[1].value;
6if(checkEmail==''){
7	isRight=$('.txt_subscribe_right_detail_top').val();
8}
9else{
10	isRight=$('.txt_subscribe_right_main')[1].value;
11}
12
13
14	if(!isRight){
15		$('.txt_subscribe').each(function(){
16			if($(this).val()){
17				email=$(this).val();  
18				$(this).val('');
19				isOK=ValidateEmail(email); 
20				if(isOK){		
21					$(this).next().next().css('color','blue');
22					$(this).next().next().text('You’ve been subscribed successfully');
23					}
24				else
25				{
26					$(this).next().next().css('color','red');
27					$(this).next().next().text('Please enter valid email address!');
28				}
29			}
30		});
31	}else{
32		email=isRight;
33		isOK=ValidateEmail(email); 
34		if(isOK)
35			addSuccessMsg();
36		else		
37			$('#lblError').text('Invalid Email Address');
38	}
39	
40	if(isOK){
41
42		var data = {
43			action: 'subscribe_call',
44			nonce: subscribe.nonce,
45			name: 'subscribe',
46			email: email,
47			dataType : "json",						
48		};
49		$.post(subscribe.url, data, function(res) {				
50		if(res!=""){
51			if(isRight){									
52				send_email(email);
53				ga('create', 'UA-98385680-2', 'auto');
54				ga('send', 'event', 'PPCBlogTopSubscribeButton', 'Click', 'PPCBlogTopSubscribeButtonClick', '1');
55			}
56			else{
57				send_email(email);
58			}
59				
60		}							
61		}).fail(function(xhr, textStatus, e) {
62			console.log(xhr.responseText);
63		});
64	}	
65}
66function signup_save(){
67	var email=$('#txt_email').val();
68	var name=$('#txt_username').val();
69	var isOK=ValidateEmail(email); 
70
71	if(isOK){
72
73		var data = {
74			action: 'subscribe_call',
75			nonce: subscribe.nonce,
76			name: name,
77			email:email,
78			dataType : "json",						
79		};
80		$.post(subscribe.url, data, function(res) {						
81		if(res!=""){
82			$('.sign-up-popup').hide();
83			isClosed=1;
84			console.log(res.responseText);
85			send_email(email);			
86			localStorage.currentUserFlag = 1;
87			ga('create', 'UA-98385680-2', 'auto');
88			ga('send', 'event', 'PPCBlogBottomSubscribeButton', 'Click', 'PPCBlogBottomSubscribeButtonClick', '1');
89			
90		}							
91		}).fail(function(xhr, textStatus, e) {
92			console.log(xhr.responseText);
93		});
94	}	
95}
96function ValidateEmail(mail) 
97{
98 if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(mail))
99  {
100	  
101    return (true)
102  }    
103    return (false)
104}
105function addSuccessMsg() {
106var codeBlock = '<div style="text-align: center">' +
107					'<img src="/blog/wp-content/themes/polyvistablog/images/done.png" alt="">' +
108				'</div>'+
109				'<div>'+
110					'<h4 style="text-align: center">You’ve been subscribed successfully</h4>'+
111				'</div>'+
112				'<p>Please like us on social media</p>'+
113					'<div style="padding:0; margin:0; width:100%;"><div title="Like PPCexpo" class="fb-like-bg" style="width:67px;margin:0 5px 0 0;float:left;display: inline-block;padding:0;"> <script async defer crossorigin="anonymous" src="https://connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v5.0"></script><div class="fb-like" data-href="https://developers.facebook.com/docs/plugins/" data-width="300px" data-layout="button" data-action="like" data-size="large" data-show-faces="false" data-share="false"></div></div>'+ 
114				'<div class="twt-follow-bg" style="width:79px;margin:0 5px 0 0;float:left;display: inline-block;padding:0;"><a href="https://twitter.com/getppcexpo?ref_src=twsrc%5Etfw" class="twitter-follow-button" data-size="large" data-show-screen-name="false" data-show-count="false"></a><script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script></div>'+
115'<div class="in-follow-bg" style="width:80px;margin:0;display: inline-block;padding:0;"><script src="https://platform.linkedin.com/in.js" type="text/javascript"> lang: en_US</script><script type="IN/FollowCompany" data-id="14396648" data-counter=""></script>'+
116				'</div>';
117 $('.subscribe-box-detail').html(codeBlock);
118
119ga('create', 'UA-98385680-2', 'auto');
120ga('send', 'event', 'Blog', 'Subscribed', 'Subscribe', '1');
121 
122}
123function send_email(emailto) {
124    var settings = {
125        "url": "https://ppcexpo.com/blogsubscriptionemail" + '/api/values/',
126        "method": "POST",
127        "timeout": 0,
128        "headers": {
129            "Content-Type": "application/json"
130        },
131        "data": JSON.stringify(emailto),
132    };
133
134    $.ajax(settings).done(function (response) {
135        console.log(response);
136    });
137	
138}
139function myTimer() {
140 
141}
142function removeRow(input) {
143  
144}

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.