1(function ($) { 2 3 $(document).ready(function () { 4 5 function handlePasswordToggle(selector, wrapperClass, fieldClass) { 6 $(selector).each(function () { 7 const passwordInput = $(this); 8 const closestDiv = passwordInput.closest('div'); 9 10 closestDiv.addClass(wrapperClass).parent().addClass(fieldClass); 11 if (closestDiv.find('.rm-togglePassword').length === 0) { 12 closestDiv.append('<span class="rm-togglePassword"></span>'); 13 } 14 15 closestDiv.find('.rm-togglePassword').on('click', function () { 16 const type = passwordInput.attr('type') === 'password' ? 'text' : 'password'; 17 passwordInput.attr('type', type); 18 $(this).toggleClass('rm-togglePassword-show'); 19 }); 20 }); 21 } 22 23 24 handlePasswordToggle('.rm-login-wrapper [name="pwd"]', 'rm-password-toggle-wrap', ''); 25 handlePasswordToggle('#rm-form-container [name="pwd"], .rmagic form.rmagic-form .rmagic-row .rmagic-fields-wrap [name="pwd"]', 'rmform-password-toggle-wrap', 'rmform-password-field-col'); 26 handlePasswordToggle('#rm-form-container [name="password_confirmation"], .rmagic form.rmagic-form .rmagic-row .rmagic-fields-wrap [name="password_confirmation"]', 'rmform-c-password-toggle-wrap', 'rmform-password-field-col'); 27 handlePasswordToggle('#rm_reset_pass_form [name="new_pass"]', 'rm-password-toggle-wrap', ''); 28 handlePasswordToggle('#rm_reset_pass_form [name="new_pass_repeat"]', 'rm-password-toggle-wrap', ''); 29 30 31 32 }); 33 34 35})(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.