WordPress/wp-admin/js/about.min.js

1 line
1005 B
JavaScript
Raw Normal View History

!function(a){function b(){var b=wp.passwordStrength.meter(f.val(),[],f.val());switch(a("#pass-strength-result").removeClass("short bad good strong"),b){case 2:a("#pass-strength-result").addClass("bad").html(pwsL10n.bad);break;case 3:a("#pass-strength-result").addClass("good").html(pwsL10n.good);break;case 4:a("#pass-strength-result").addClass("strong").html(pwsL10n.strong);break;default:a("#pass-strength-result").addClass("short").html(pwsL10n["short"])}}function c(){g!==!1&&(f.val().length<e.length?(f.val(e.substr(0,f.val().length+1)),b()):(f.val(""),a("#pass-strength-result").removeClass("short bad good strong")),setTimeout(c,220+Math.floor(580*Math.random())))}function d(){"undefined"!=typeof zxcvbn?c():setTimeout(d,800)}var e="Gosh, WordPress is grand.",f=a("#pass"),g=!0,h=a("#pass-strength-result").text();f.on("focus",function(){g=!1,a("#pass-strength-result").removeClass("short bad good strong"),a("#pass-strength-result").text(h),f.val("")}),f.on("keyup",function(){b()}),d()}(jQuery);