1(function ($) { 2 $(document).on("click", ".password_preview", function (e) { 3 e.preventDefault(); 4 var ursL10n = user_registration_params.ursL10n; 5 6 var current_task = $(this).hasClass("dashicons-hidden") 7 ? "show" 8 : "hide"; 9 var $password_field = $(this) 10 .closest(".user-registration-form-row") 11 .find('input[name="password"]'); 12 13 // Hide/show password for user registration form 14 if ($password_field.length === 0) { 15 $password_field = $(this) 16 .closest(".field-user_pass") 17 .find('input[name="user_pass"]'); 18 } 19 if ($password_field.length === 0) { 20 $password_field = $(this) 21 .closest(".field-user_confirm_password") 22 .find('input[name="user_confirm_password"]'); 23 } 24 25 // Hide/show password for edit password form 26 if ($password_field.length === 0) { 27 $password_field = $(this) 28 .closest(".user-registration-form-row") 29 .find('input[name="password_current"]'); 30 } 31 if ($password_field.length === 0) { 32 $password_field = $(this) 33 .closest(".user-registration-form-row") 34 .find('input[name="password_1"]'); 35 } 36 if ($password_field.length === 0) { 37 $password_field = $(this) 38 .closest(".user-registration-form-row") 39 .find('input[name="password_2"]'); 40 } 41 if ($password_field.length === 0) { 42 $password_field = $(this) 43 .closest(".field-password") 44 .find(".input-password"); 45 } 46 47 if ($password_field.length > 0) { 48 switch (current_task) { 49 case "show": 50 $password_field.attr("type", "text"); 51 $(this) 52 .removeClass("dashicons-hidden") 53 .addClass("dashicons-visibility"); 54 $(this).attr("title", ursL10n.hide_password_title); 55 break; 56 case "hide": 57 $password_field.attr("type", "password"); 58 $(this) 59 .removeClass("dashicons-visibility") 60 .addClass("dashicons-hidden"); 61 $(this).attr("title", ursL10n.show_password_title); 62 break; 63 } 64 } 65 }); 66 $(document).ready(function () { 67 $("form").on( 68 "focus", 69 "#user_url, #user_registration_user_url", 70 function () { 71 var url = $(this).val().trim(); 72 73 // Only append "https://" if the field is empty 74 if (url === "") { 75 $(this).val("https://"); 76 } 77 } 78 ); 79 }); 80})(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.