Avoid JSHint errors. Use dot notation when able and declare pwsL10n as a global.

props jorbin.
fixes #25870.

Built from https://develop.svn.wordpress.org/trunk@26065


git-svn-id: http://core.svn.wordpress.org/trunk@25986 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2013-11-09 21:21:10 +00:00
parent d485bc61f3
commit c81508dc43
1 changed files with 4 additions and 3 deletions

View File

@ -1,3 +1,4 @@
/* global pwsL10n:true */
(function($){
var password = 'Gosh, WordPress is grand.',
$input = $('#pass'),
@ -19,13 +20,13 @@
$('#pass-strength-result').removeClass('short bad good strong');
switch ( strength ) {
case 2:
$('#pass-strength-result').addClass('bad').html( pwsL10n['bad'] );
$('#pass-strength-result').addClass('bad').html( pwsL10n.bad );
break;
case 3:
$('#pass-strength-result').addClass('good').html( pwsL10n['good'] );
$('#pass-strength-result').addClass('good').html( pwsL10n.good );
break;
case 4:
$('#pass-strength-result').addClass('strong').html( pwsL10n['strong'] );
$('#pass-strength-result').addClass('strong').html( pwsL10n.strong );
break;
default:
$('#pass-strength-result').addClass('short').html( pwsL10n['short'] );