1(function ($) { 2 $.fn.EnforceAutoComplete = function () { 3 $("input[type='password']", this).each(function () { 4 if (this.name != "") { 5 //Create Hidden Input, validator and forms use hidden value 6 $(this) 7 .after("<input type=\"hidden\" id=\"" + this.id + "\" name=\"" + this.name + "\" />") 8 .data("autocomplete", this.id) 9 .attr("name", null) 10 .attr("id", null); // LastPass find the PWd by ID 11 } 12 }).bind("change keyup input", function () { 13 $("#" + $(this).data("autocomplete")).attr("value", this.value); 14 }); 15 }; 16 17 $(function () { 18 $("form") 19 .each(function () { 20 // IE11 21 var prefix = (this.name || this.id || "") + "_"; 22 $(this).prepend("<div style=\"display:none\"><input type=\"text\" id=\"" + prefix + "username\" name=\"" + prefix + "username\" /><input type=\"password\" id=\"" + prefix + "password\" name=\"" + prefix + "password\" /></div>"); 23 }) 24 .submit(function () { 25 // LastPass 26 if (Page_IsValid) { 27 $("input[type='password']").each(function () { 28 if ($(this).data("autocomplete")) { 29 $("#" + $(this).data("autocomplete")).attr("value", this.value); 30 $(this).attr("value", ""); 31 } 32 }); 33 } 34 }) 35 .EnforceAutoComplete(); 36 }); 37 38 //for Microsoft Ajax 39 function EnforceAutoCompletePanelLoaded(sender, args) { 40 var updatedPanels = args.get_panelsUpdated(); 41 for (var i = 0; i < updatedPanels.length; i++) { 42 $(updatedPanels[0]).EnforceAutoComplete(); 43 } 44 } 45 46 if (typeof (Sys) != "undefined") { 47 Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(EnforceAutoCompletePanelLoaded); 48 } 49} (jQuery));
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.