-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
29 lines (24 loc) · 785 Bytes
/
Copy pathscript.js
File metadata and controls
29 lines (24 loc) · 785 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
var i =0;
function onSignIn(googleUser) {
var profile = googleUser.getBasicProfile();
document.getElementById("emailval").value=profile.getEmail();
document.getElementById("nameval").value=profile.getName();
$(".g-signin2").css("display","none");
$(".data").css("display","block");
$("#pic").attr('src',profile.getImageUrl());
$("#name").text(profile.getName());
$("#email").text(profile.getEmail());
i=1;
}
function signOut() {
var auth2 = gapi.auth2.getAuthInstance();
auth2.signOut().then(function () {
alert("successfully logged out");
$(".g-signin2").css("display","block");
$(".data").css("display","none");
});
}
function signIN(){
if(i==1)
document.getElementById("signinform").submit();
}