PageSourceSearch

https://www.paperspan.com/js/form.js

js paperspan.com collected 2026-09-24 10:46:42 UTC 3,707 bytes, 131 lines download raw bytes

1$(function(){
2    //first_step
3    $('#submit_first').click(function(){
4		var isValid = false;
5		var unme = $('input[name="uname"]').val();
6		var pawd = $('input[name="pwd"]').val();
7		if ((unme == 'username') || (unme == '')) {
8			Materialize.toast('Please enter a username', 3000);
9			return false;
10		}
11		if ((pawd == 'password') || (pawd == '')) {
12			Materialize.toast('Please enter a password', 3000);
13			return false;
14		}
15		if(!gresponse){
16			Materialize.toast('Captcha failure. Please select captcha.', 3000);
17			return false;
18		}
19		$('.progress').show();
20		var datas = {};
21		datas["uname"] = unme;
22		datas["pwd"] = pawd;
23		datas["g-recaptcha-response"] = gresponse;		
24		$.ajax({
25			type: 'POST',
26			url: "/signup.do",
27			data: datas,
28			xhrFields: { withCredentials: true },
29			success: function(data){
30				data = $.parseJSON(data);
31				if (data.yFailed == 0) {
32					//$("form#signupf").submit();
33					window.location.href = "/list";
34				} else if (data.yFailed == 1) {
35					$('.progress').hide();
36					Materialize.toast('This username already taken.', 3000);
37				} else if (data.yFailed == 2) {
38					$('.progress').hide();
39					Materialize.toast('Invalid username or password.', 3000);
40				}else if (data.yFailed == 3) {
41					$('.progress').hide();
42					Materialize.toast('Captcha failed. Please Re-select.', 3000);
43				}else {
44					$('.progress').hide();
45					Materialize.toast('Problem Resigtering. Please try again', 3000);
46				}
47			},
48			error: function() {
49				$('.progress').hide();
50				Materialize.toast('An error has occurred while Signup. Please try again.', 3000);
51			},
52			complete: function(e) {
53				$('.progress').hide();
54				gresponse = undefined;
55				grecaptcha.reset();
56			}
57		});
58		return false;
59	 });
60	 //Loginsubmit
61	 $('#login_submit').click(function(){
62		var isValid = false;
63		//alert('Entered...');
64		var unme = $('input[name="username"]').val();
65		var pawd = $('input[name="password"]').val();
66		//alert("unme "+unme);
67		if ((unme == 'username' || unme == '') ) {
68			Materialize.toast('Please enter Email or Username', 3000);
69			return false;
70		}
71		if (pawd == 'password') {
72			pawd = '';
73		}
74		$('.progress').show();
75		var datas = {};
76		datas["uname"] = unme;
77		datas["pwd"] = pawd;
78		$.ajax({
79			type: 'POST',
80			url: "/jLogin.do",
81			data: datas,
82			xhrFields: { withCredentials: true },
83			success: function(data){
84				data = $.parseJSON(data);
85				if (data.yFailed == 0) {
86					//$("form#loginf").submit();
87					window.location.href = "/list";
88				} else if (data.yFailed == 1) {
89					$('.progress').hide();
90					Materialize.toast('Username not correct. Please try again.', 3000);
91				} else if (data.yFailed == 2) {
92					$('.progress').hide();
93					Materialize.toast('Invalid password. Please try again.', 3000);
94				} else {
95					$('.progress').hide();
96					Materialize.toast( 'Problem logging  in. Please try again.', 3000);
97				}
98			},
99			error: function() {
100				$('.progress').hide();
101				Materialize.toast('Problem loggin in. Please try again.', 3000);
102			},
103			complete: function() {
104				$('.progress').hide();
105			}
106		});
107		return false;
108	 });
109	$('.progress').hide();
110	$('.progress').css("margin","0");
111	$('.progress').css("position","absolute");
112	$('.social_icon').css("line-height","2rem");
113
114});
115function isValidEmail(pEmail) {
116    var filter = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
117
118    if (!filter.test(pEmail)) {
119        return false;
120    }
121
122    return true;
123}
124function openFacebookShare() {
125	var sharer = "https://www.facebook.com/sharer/sharer.php?u=http://Paper
125Span.com";
126	window.open(sharer, 'sharer', 'width=626,height=436');
127}
128var gresponse;
129function onCaptchaResponse(response){
130	gresponse = response;
131}

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.