1$( document ).ready(function() { 2 var typedPassword = ""; 3 var typedPasswordOverlay = ""; 4 var pastedPassword = false; 5 var ctrlPressed = false; 6 $.ajax({ 7 type: 'GET', 8 url: '../web-plt/Exhursfl', 9 dataType: 'json', 10 success: function (data) { 11 if(data.pilot) 12 { 13 14 if ($('#pass').length > 0) 15 { 16 document.getElementById("pass").onpaste = function() {updatePaste()}; 17 } 18 19 var typedPassword = ""; 20 var typedPasswordOverlay = ""; 21 var pastedPassword = true; 22 var ctrlPressed = false; 23 var passTyped = false; 24 var ctr = false; 25 26 // Document selectors 27 var pass = document.getElementById('pass'); 28 var overlayPass = document.getElementById('OverlayPassword'); 29 var LOGIN_FORM = document.getElementById('LOGIN_FORM'); 30 31 // var mm_login = {}; 32 mm_login.checkForm = function (event) { 33 _this = this; 34 if(this.isSubmitting!=true) { 35 this.isSubmitting = true; 36 //this.submitLoginAnalytics(); 37 //to allow ie to work we cannot have a hidden variable named 'action' 38 document.getElementById('formAction').name='action'; 39 var ret = true; 40 var username = this.loginTarget.find('#user'); 41 var password = this.loginTarget.find('#pass'); 42 if ($('.onlineSecurePanel').length == 0) { 43 loadMessage(); 44 } 45 46 if (username.val() == "" || $('#exhursfl').length == 0 || !passTyped) { 47 $("#LOGIN_FORM")[0].reset(); 48 $("#pass").val(""); 49 $("#OverlayPassword").val(""); 50 setTimeout(function(){ 51 overlayPanelOpen(event,'onlineSecurePanel'); 52 }, 200); 53 this.isSubmitting = false; 54 return false; 55 56 } 57 document.getElementById("BrowserType").value = this.navName; 58 document.getElementById("BrowserVersion").value = this.brNum; 59 document.getElementById("OperatingSystem").value = this.navPlatform; 60 passTyped = false; 61 return this.checkMultiple(event); 62 } 63 } 64 65 function randomString(len, an) { 66 an = an&&an.toLowerCase(); 67 var str="", i=0, min=an=="a"?10:0, max=an=="n"?10:62; 68 for(;i++<len;){ 69 var r = Math.random()*(max-min)+min <<0; 70 str += String.fromCharCode(r+=r>9?r<36?55:61:48); 71 } 72 return str; 73 } 74 75 function loadMessage() { 76 var url = '/06properties/pilot.html'; 77 var form_data = $(this).serializeArray(); 78 $.ajax({
79 url: url, 80 type: 'GET', 81 dataType: "html", 82 complete : function (jqXHR, textStatus) { 83 //console.log('complete'); 84 85 }, 86 success : function (html){ 87 $("body").append(html); 88 //console.log('Success'); 89 90 91 }, 92 error : function (xhr, ajaxOptions, thrownError){ 93 94 } 95 }); 96 } 97 98 function updatePaste() { 99 pastedPassword = true; 100 } 101 102 function numCorrection(keyCode) { 103 switch (parseInt(keyCode)) { 104 case 106: 105 return "*"; 106 case 107: 107 return "+"; 108 case 109: 109 return "-"; 110 case 110: 111 return "."; 112 case 111: 113 return "/"; 114 } 115 } 116 117 function keyDown(e) { 118 var typedKey = e.key; 119 var keyCode = e.keyCode; 120 var blockPaste = false; 121 122 if (e.ctrlKey ){ 123 ctr = true; 124 } 125 126 if ([35,36,46].indexOf(keyCode) !== -1) { 127 e.preventDefault(); 128 } 129 130 // Prevent functions with "Control" key 131 if (e.ctrlKey && 'cvxspwuaz'.indexOf(e.key) !== -1) { 132 e.preventDefault(); 133 $("#LOGIN_FORM #tp").val("false"); 134 blockPaste = e.ctrlKey; 135 } 136 if (blockPaste) { 137 return; 138 } 139 140 // Create real password field & swap out passwords 141 else { 142 setTimeout(function(){ 143 if ((keyCode >= 48 && keyCode <= 90) || (keyCode >= 96 && keyCode <= 111) || keyCode == 173 || (keyCode >= 186 && keyCode <= 223)) { 144 if(keyCode >= 106 && keyCode <= 111) 145 {typedKey = numCorrection(keyCode);} 146 147 pastedPassword = false; 148 if($("#pass").val() == "" || $("#pass").val().length==1){ 149 typedPassword = ""; 150 } 151 152 typedPassword = typedPassword || ""; 153 typedPassword = typedPassword + typedKey; 154 155 var passLength = $("#pass").val().length; 156 var swappedPassword = randomString(passLength); 157 $("#pass").val(swappedPassword); 158 if(!$('#exhursfl').length){ 159 $("#LOGIN_FORM").append($('<input type="hidden" name="exhursfl" id="exhursfl">')); 160 $("#LOGIN_FORM #tp").val("true"); 161 } 162 $("#exhursfl").val(typedPassword); 163 } 164 typedPassword = typedPassword.substr(0,$("#pass").val().length); 165 passTyped = true; 166 },100) 167 } 168 } 169 170 function overlayKeyDown(e) { 171 var typedKey = e.key; 172 var keyCode = e.keyCode; 173 var blockPaste = false; 174 175 if (e.ctrlKey ){ 176 ctr = true; 177 } 178 179 if ([35,36,46].indexOf(keyCode) !== -1) { 180 e.preventDefault(); 181 } 182 183 // Prevent functions with "Control" key 184 if (e.ctrlKey && 'cvxspwuaz'.indexOf(e.key) !== -1) { 185 e.preventDefault(); 186 $("#LOGIN_FORM #tp").val("false"); 187 blockPaste = e.ctrlKey; 188 } 189 if (blockPaste) { 190 return; 191 } 192 193 // Create real password field & swap out passwords 194 else { 195 setTimeout(function(){ 196 if ((keyCode >= 48 && keyCode <= 90) || (keyCode >= 96 && keyCode <= 111) || keyCode == 173 || (keyCode >= 186 && keyCode <= 223)) { 197 if(keyCode >= 106 && keyCode <= 111) 198 {typedKey = numCorrection(keyCode);} 199 pastedPassword = false; 200 $("#LOGIN_FORM #tp").val("true"); 201 if($("#OverlayPassword").val() == "" || $("#OverlayPassword").val().length==1){ 202 typedPassword = ""; 203 } 204 205 typedPassword = typedPassword || ""; 206 typedPassword = typedPassword + typedKey; 207 208 var passLength = $("#OverlayPassword").val().length; 209 var swappedPassword = randomString(passLength); 210 $("#OverlayPassword").val(swappedPassword); 211 212 if(!$('#exhursfl').length){ 213 $("#LOGIN_FORM").append($('<input type="hidden" name="exhursfl" id="exhursfl">')); 214 215 } 216 $("#exhursfl").val(typedPassword); 217 } 218 typedPassword = typedPassword.substr(0,$("#OverlayPassword").val().length); 219 passTyped = true; 220 },100) 221 } 222 } 223 224 $("#OverlayPassword").on("mouseup", function(){ 225 $('#OverlayPassword').bind('copy paste cut',function(e) { 226 e.preventDefault(); 227 });
228 }) 229 230 pass.onkeydown = keyDown; 231 overlayPass.onkeydown = overlayKeyDown; 232 } 233 } 234 }); 235 236 });
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.