1 2var googleUser = {}; 3var UserType = ''; 4 5function SetUserType(value) 6{ 7 UserType = value; 8} 9 10var glLogin = function () { 11 gapi.load('auth2', function () { 12 auth2 = gapi.auth2.init({ 13 client_id: '967877955436-8slautdlns1sgo28d1uqipc4m2bl7rt0.apps.googleusercontent.com', 14 cookiepolicy: 'single_host_origin', 15 //scope: 'profile email' 16 }); 17 attachSignin(document.getElementById('btnGoogle')); 18 attachSignin(document.getElementById('btnGoogleEx')); 19 }); 20}; 21 22function attachSignin(element) { 23 auth2.attachClickHandler(element, {}, 24 function (googleUser) { 25 var profile = googleUser.getBasicProfile(); 26 var id_token = googleUser.getAuthResponse().id_token; 27 PostData(id_token, 1); 28 }, function (error) {}); 29} 30 31//glLogin(); 32 33function fbLogin() { 34 FB.login(function (response) { 35 statusChangeCallback(response); 36 }, { scope: 'email' }); 37} 38 39function checkLoginState() { 40 FB.getLoginStatus(function (response) { 41 statusChangeCallback(response); 42 }); 43} 44 45function statusChangeCallback(response) { 46 if (response.status === 'connected') { 47 PostData(response.authResponse.accessToken, 2); 48 } 49} 50 51window.fbAsyncInit = function () { 52 FB.init({ appId: Token, cookie: true, xfbml: true, version: 'v2.9' }); 53}; 54 55(function (d, s, id) { 56 var js, fjs = d.getElementsByTagName(s)[0]; 57 if (d.getElementById(id)) return; 58 js = d.createElement(s); js.id = id; 59 js.src = "//connect.facebook.net/en_US/sdk.js"; 60 fjs.parentNode.insertBefore(js, fjs); 61}(document, 'script', 'facebook-jssdk')); 62 63 64function PostData(TokenID, SocialID) { 65 $.ajax({
66 type: "POST", 67 url: "/signupother.aspx/AuthenticateUser", 68 data: '{TokenID: "' + TokenID + '", SocialID: "' + SocialID + '", UserType: "' + UserType + '"}', 69 contentType: "application/json; charset=utf-8", 70 dataType: "json", 71 success: function (response) { 72 window.location.href = response.d; 73 }, 74 failure: function (response) { 75 alert(response.d); 76 } 77 }); 78} 79 80function OnSuccess(response) { 81 window.location.href = "/signupother.aspx?asdasd"; 82 if (response != null & response.d != '') { 83 window.location.href = response.d; 84 } 85}
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.