]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/js/password-strength-meter.js
Wordpress 3.0
[autoinstalls/wordpress.git] / wp-admin / js / password-strength-meter.js
index f79937ec9b09111a0ab987ea876b76b002c1ce37..957d454a6e9d9151090427b42a0e1d54ed5d9150 100644 (file)
@@ -1 +1 @@
-function passwordStrength(i,f){var h=1,e=2,b=3,a=4,d=0,g,c;if(i.length<4){return h}if(i.toLowerCase()==f.toLowerCase()){return e}if(i.match(/[0-9]/)){d+=10}if(i.match(/[a-z]/)){d+=26}if(i.match(/[A-Z]/)){d+=26}if(i.match(/[^a-zA-Z0-9]/)){d+=31}g=Math.log(Math.pow(d,i.length));c=g/Math.LN2;if(c<40){return e}if(c<56){return b}return a};
\ No newline at end of file
+function passwordStrength(f,i,d){var k=1,h=2,b=3,a=4,c=5,g=0,j,e;if((f!=d)&&d.length>0){return c}if(f.length<4){return k}if(f.toLowerCase()==i.toLowerCase()){return h}if(f.match(/[0-9]/)){g+=10}if(f.match(/[a-z]/)){g+=26}if(f.match(/[A-Z]/)){g+=26}if(f.match(/[^a-zA-Z0-9]/)){g+=31}j=Math.log(Math.pow(g,f.length));e=j/Math.LN2;if(e<40){return h}if(e<56){return b}return a};
\ No newline at end of file