WordPress/wp-admin/js/about.min.js
Andrew Nacin 70fd806759 Revert r25824:25875 from the core.svn.wordpress.org repository.
These commits were accidentally re-synced commits from develop.svn.wordpress.org due to a race condition. Thankfully, the history of this repository matters fairly little. It also happened only for trunk.


git-svn-id: http://core.svn.wordpress.org/trunk@25876 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-25 02:29:52 +00:00

1 line
1.1 KiB
JavaScript

!function(a){function b(){var b;switch("undefined"==typeof j[g.val()]?(b=wp.passwordStrength.meter(g.val(),[],g.val()),j[g.val()]=b):b=j[g.val()],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.val(""),a("#pass-strength-result").text(k),a("#pass-strength-result").removeClass("short bad good strong")}function d(){h!==!1&&(g.val().length<f.length?(g.val(f.substr(0,g.val().length+1)),b(),setTimeout(d,i[Math.floor(Math.random()*i.length)])):(c(),setTimeout(d,700)))}function e(){"undefined"!=typeof zxcvbn?d():setTimeout(e,800)}var f="Gosh, WordPress is grand.",g=a("#pass"),h=!0,i=[280,300,305,310,315,325,330,345,360,370,380,400,450,500,600],j={},k=a("#pass-strength-result").text();g.on("focus",function(){h=!1,c()}),g.on("keyup",function(){b()}),e()}(jQuery);