1function getUsername() { 2 var username; 3 var authType = $("input[name='authType']").val(); 4 if (!authType || authType == 'account-item') { 5 username = $("input#username").val().trim(); 6 if (!username) { 7 username = window.sessionStorage.getItem('username-tag') 8 } 9 } else if (authType == 'mobile-item') { 10 username = $('#area_mobile').val() + "-" + $("input#mobile").val().trim(); 11 if (!username) { 12 username = window.sessionStorage.getItem('mobile-tag') 13 } 14 } else if (authType == 'sms-item') { 15 username = $('#area_sms').val() + "-" + $("input#sms").val().trim(); 16 if (!username) { 17 username = window.sessionStorage.getItem('sms-tag') 18 } 19 } else if (authType == 'mail-item') { 20 username = $("input#mail").val().trim(); 21 if (!username) { 22 username = window.sessionStorage.getItem('mail-tag') 23 } 24 } else if (authType == 'mc-item') { 25 username = $("input#mc").val().trim(); 26 if (!username) { 27 username = window.sessionStorage.getItem('mc-tag') 28 } 29 } 30 if (!username) { 31 username = masPrivacyUid; 32 } 33 return username; 34} 35function getUsername2() { 36 var username; 37 var authType = $("input[name='authType']").val(); 38 if (!authType || authType == 'account-item') { 39 username = $("input#username").val().trim(); 40 } else if (authType == 'mobile-item') { 41 username = $('#area_mobile').val() + "-" + $("input#mobile").val().trim(); 42 } else if (authType == 'sms-item') { 43 username = $('#area_sms').val() + "-" + $("input#sms").val().trim(); 44 } else if (authType == 'mail-item') { 45 username = $("input#mail").val().trim(); 46 } else if (authType == 'mc-item') { 47 username = $("input#mc").val().trim(); 48 } 49 return username; 50} 51 52function checkIfAgreed() { 53 var username = getUsername(); 54 if (username && masPrivacyAppId) { 55 if (!isCheckedPrivacy()) { 56 var param = 'uid=' + username + '&appId=' + masPrivacyAppId; 57 $.get(ctx + "/flow/face/isAgreed?" + param, function (result) { 58 var div = $("div.remember.read"); 59 var rememberMe = $("input[name='private_url_a']"); 60 if (result.status === '1') { 61 div.addClass("checked"); 62 rememberMe.attr("checked", true); 63 } else { 64 div.removeClass("checked"); 65 rememberMe.attr("checked", false); 66 } 67 window.isChecking = false; 68 }); 69 } else { 70 window.isChecking = false; 71 } 72 } 73} 74function uncheckPrivacy() { 75 var div = $("div.remember.read"); 76 var rememberMe = $("input[name='private_url_a']"); 77 div.removeClass("checked"); 78 rememberMe.attr("checked", false); 79} 80function isCheckedPrivacy() { 81 var div = $("div.remember.read"); 82 var rememberMe = $("input[name='private_url_a']"); 83 if (div.hasClass("checked") && rememberMe.is(":checked")) { 84 return true; 85 } else { 86 return false; 87 } 88} 89 90window.isChecking = false; 91$(function () { 92 checkIfAgreed(); 93 $("input#username,input#mobile,input#sms,input#mail,input#mc").on("blur", function() { 94 window.isChecking = true; 95 var username = getUsername2(); 96 if (!isCheckedPrivacy() && (!username || username == 'null')) { 97 uncheckPrivacy(); 98 return; 99 } 100 checkIfAgreed(); 101 }); 102 $("input#username,input#mobile,input#sms,input#mail,input#mc").on("focus", function() { 103 var username = getUsername2(); 104 if (!isCheckedPrivacy() && (!username || username == 'null')) { 105 uncheckPrivacy(); 106 } 107 }); 108});
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.