Fix JSHint errors in 3 files.
props atimmer. fixes #25990, #25993, #26008. git-svn-id: https://develop.svn.wordpress.org/trunk@26199 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
f25abde28f
commit
46a5e7a863
|
@ -1,3 +1,4 @@
|
||||||
|
/* global zxcvbn */
|
||||||
window.wp = window.wp || {};
|
window.wp = window.wp || {};
|
||||||
|
|
||||||
var passwordStrength;
|
var passwordStrength;
|
||||||
|
@ -40,7 +41,7 @@ var passwordStrength;
|
||||||
for ( i = 0; i < userInputFieldsLength; i++ ) {
|
for ( i = 0; i < userInputFieldsLength; i++ ) {
|
||||||
currentField = $( '#' + userInputFields[ i ] );
|
currentField = $( '#' + userInputFields[ i ] );
|
||||||
|
|
||||||
if ( 0 == currentField.length ) {
|
if ( 0 === currentField.length ) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,7 +59,7 @@ var passwordStrength;
|
||||||
|
|
||||||
// Remove empty values, short words, and duplicates. Short words are likely to cause many false positives.
|
// Remove empty values, short words, and duplicates. Short words are likely to cause many false positives.
|
||||||
blacklist = $.grep( blacklist, function( value, key ) {
|
blacklist = $.grep( blacklist, function( value, key ) {
|
||||||
if ( '' == value || 4 > value.length ) {
|
if ( '' === value || 4 > value.length ) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,7 +68,7 @@ var passwordStrength;
|
||||||
|
|
||||||
return blacklist;
|
return blacklist;
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
// Backwards compatibility.
|
// Backwards compatibility.
|
||||||
passwordStrength = wp.passwordStrength.meter;
|
passwordStrength = wp.passwordStrength.meter;
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
/* global plugininstallL10n, tb_click, confirm */
|
||||||
|
|
||||||
/* Plugin Browser Thickbox related JS*/
|
/* Plugin Browser Thickbox related JS*/
|
||||||
var tb_position;
|
var tb_position;
|
||||||
jQuery(document).ready(function($) {
|
jQuery(document).ready(function($) {
|
||||||
|
@ -13,7 +15,7 @@ jQuery(document).ready(function($) {
|
||||||
tbWindow.css({'margin-left': '-' + parseInt((( W - 50 ) / 2),10) + 'px'});
|
tbWindow.css({'margin-left': '-' + parseInt((( W - 50 ) / 2),10) + 'px'});
|
||||||
if ( typeof document.body.style.maxWidth != 'undefined' )
|
if ( typeof document.body.style.maxWidth != 'undefined' )
|
||||||
tbWindow.css({'top': 20 + adminbar_height + 'px','margin-top':'0'});
|
tbWindow.css({'top': 20 + adminbar_height + 'px','margin-top':'0'});
|
||||||
};
|
}
|
||||||
|
|
||||||
return $('a.thickbox').each( function() {
|
return $('a.thickbox').each( function() {
|
||||||
var href = $(this).attr('href');
|
var href = $(this).attr('href');
|
||||||
|
|
|
@ -1,9 +1,12 @@
|
||||||
function WPSetAsThumbnail(id, nonce){
|
/* global setPostThumbnailL10n, ajaxurl, post_id, alert */
|
||||||
|
/* exported WPSetAsThumbnail */
|
||||||
|
|
||||||
|
function WPSetAsThumbnail( id, nonce ) {
|
||||||
var $link = jQuery('a#wp-post-thumbnail-' + id);
|
var $link = jQuery('a#wp-post-thumbnail-' + id);
|
||||||
|
|
||||||
$link.text( setPostThumbnailL10n.saving );
|
$link.text( setPostThumbnailL10n.saving );
|
||||||
jQuery.post(ajaxurl, {
|
jQuery.post(ajaxurl, {
|
||||||
action:"set-post-thumbnail", post_id: post_id, thumbnail_id: id, _ajax_nonce: nonce, cookie: encodeURIComponent(document.cookie)
|
action: 'set-post-thumbnail', post_id: post_id, thumbnail_id: id, _ajax_nonce: nonce, cookie: encodeURIComponent( document.cookie )
|
||||||
}, function(str){
|
}, function(str){
|
||||||
var win = window.dialogArguments || opener || parent || top;
|
var win = window.dialogArguments || opener || parent || top;
|
||||||
$link.text( setPostThumbnailL10n.setThumbnail );
|
$link.text( setPostThumbnailL10n.setThumbnail );
|
||||||
|
|
Loading…
Reference in New Issue