Avoid JSHint errors. Use dot notation when able and declare pwsL10n as a global.
props jorbin. fixes #25870. git-svn-id: https://develop.svn.wordpress.org/trunk@26065 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
bab82b3b66
commit
a5ec5e4cd7
@ -1,3 +1,4 @@
|
|||||||
|
/* global pwsL10n:true */
|
||||||
(function($){
|
(function($){
|
||||||
var password = 'Gosh, WordPress is grand.',
|
var password = 'Gosh, WordPress is grand.',
|
||||||
$input = $('#pass'),
|
$input = $('#pass'),
|
||||||
@ -19,13 +20,13 @@
|
|||||||
$('#pass-strength-result').removeClass('short bad good strong');
|
$('#pass-strength-result').removeClass('short bad good strong');
|
||||||
switch ( strength ) {
|
switch ( strength ) {
|
||||||
case 2:
|
case 2:
|
||||||
$('#pass-strength-result').addClass('bad').html( pwsL10n['bad'] );
|
$('#pass-strength-result').addClass('bad').html( pwsL10n.bad );
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
$('#pass-strength-result').addClass('good').html( pwsL10n['good'] );
|
$('#pass-strength-result').addClass('good').html( pwsL10n.good );
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
$('#pass-strength-result').addClass('strong').html( pwsL10n['strong'] );
|
$('#pass-strength-result').addClass('strong').html( pwsL10n.strong );
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$('#pass-strength-result').addClass('short').html( pwsL10n['short'] );
|
$('#pass-strength-result').addClass('short').html( pwsL10n['short'] );
|
||||||
|
Loading…
Reference in New Issue
Block a user