/home/u523506497/domains/mymelon.in/public_html/info/wp-admin/js UP
/**
* @output wp-admin/js/password-strength-meter.js
*/
/* global zxcvbn */
window.wp = window.wp || {};
(function($){
var __ = wp.i18n.__,
sprintf = wp.i18n.sprintf;
/**
* Contains functions to determine the password strength.
*
* @since 3.7.0
*
* @namespace
*/
wp.passwordStrength = {
/**
* Determines the strength of a given password.
*
* Compares first password to the password confirmation.
*
* @since 3.7.0
*
* @param {string} password1 The subject password.
* @param {Array} disallowedList An array of words that will lower the entropy of
* the password.
* @param {string} password2 The password confirmation.
*
* @return {number} The password strength score.
*/
meter : function( password1, disallowedList, password2 ) {
if ( ! Array.isArray( disallowedList ) )
disallowedList = [ disallowedList.toString() ];
if (password1 != password2 && password2 && password2.length > 0)
return 5;
if ( 'undefined' === typeof window.zxcvbn ) {
// Password strength unknown.
return -1;
}
var result = zxcvbn( password1, disallowedList );
return result.score;
},
/**
* Builds an array of words that should be penalized.
*
* Certain words need to be penalized because it would lower the entropy of a
* password if they were used. The disallowedList is based on user input fields such
* as username, first name, email etc.
*
* @since 3.7.0
* @deprecated 5.5.0 Use {@see 'userInputDisallowedList()'} instead.
*
* @return {string[]} The array of words to be disallowed.
*/
userInputBlacklist : function() {
window.console.log(
sprintf(
/* translators: 1: Deprecated function name, 2: Version number, 3: Alternative function name. */
__( '%1$s is deprecated since version %2$s! Use %3$s instead. Please consider writing more inclusive code.' ),
'wp.passwordStrength.userInputBlacklist()',
'5.5.0',
'wp.passwordStrength.userInputDisallowedList()'
)
);
return wp.passwordStrength.userInputDisallowedList();
},
/**
* Builds an array of words that should be penalized.
*
* Certain words need to be penalized because it would lower the entropy of a
* password if they were used. The disallowed list is based on user input fields such
* as username, first name, email etc.
*
* @since 5.5.0
*
* @return {string[]} The array of words to be disallowed.
*/
userInputDisallowedList : function() {
var i, userInputFieldsLength, rawValuesLength, currentField,
rawValues = [],
disallowedList = [],
userInputFields = [ 'user_login', 'first_name', 'last_name', 'nickname', 'display_name', 'email', 'url', 'description', 'weblog_title', 'admin_email' ];
// Collect all the strings we want to disallow.
rawValues.push( document.title );
rawValues.push( document.URL );
userInputFieldsLength = userInputFields.length;
for ( i = 0; i < userInputFieldsLength; i++ ) {
currentField = $( '#' + userInputFields[ i ] );
if ( 0 === currentField.length ) {
continue;
}
rawValues.push( currentField[0].defaultValue );
rawValues.push( currentField.val() );
}
/*
* Strip out non-alphanumeric characters and convert each word to an
* individual entry.
*/
rawValuesLength = rawValues.length;
for ( i = 0; i < rawValuesLength; i++ ) {
if ( rawValues[ i ] ) {
disallowedList = disallowedList.concat( rawValues[ i ].replace( /\W/g, ' ' ).split( ' ' ) );
}
}
/*
* Remove empty values, short words and duplicates. Short words are likely to
* cause many false positives.
*/
disallowedList = $.grep( disallowedList, function( value, key ) {
if ( '' === value || 4 > value.length ) {
return false;
}
return $.inArray( value, disallowedList ) === key;
});
return disallowedList;
}
};
// Backward compatibility.
/**
* Password strength meter function.
*
* @since 2.5.0
* @deprecated 3.7.0 Use wp.passwordStrength.meter instead.
*
* @global
*
* @type {wp.passwordStrength.meter}
*/
window.passwordStrength = wp.passwordStrength.meter;
})(jQuery);
| accordion.js | 2933 | V |
| accordion.min.js | 758 | V |
| application-passwords.js | 6394 | V |
| application-passwords.min.js | 3024 | V |
| auth-app.js | 5796 | V |
| auth-app.min.js | 2084 | V |
| code-editor.js | 17963 | V |
| code-editor.min.js | 3543 | V |
| color-picker.js | 9768 | V |
| color-picker.min.js | 3486 | V |
| comment.js | 5205 | V |
| comment.min.js | 2081 | V |
| common.js | 70421 | V |
| common.min.js | 26210 | V |
| custom-background.js | 3435 | V |
| custom-background.min.js | 1206 | V |
| custom-header.js | 2023 | V |
| customize-controls.js | 295905 | V |
| customize-controls.min.js | 112538 | V |
| customize-nav-menus.js | 114134 | V |
| customize-nav-menus.min.js | 48272 | V |
| customize-widgets.js | 71727 | V |
| customize-widgets.min.js | 28065 | V |
| dashboard.js | 27562 | V |
| dashboard.min.js | 8711 | V |
| edit-comments.js | 38139 | V |
| edit-comments.min.js | 15515 | V |
| editor-expand.js | 42606 | V |
| editor-expand.min.js | 13451 | V |
| editor.js | 45055 | V |
| editor.min.js | 13085 | V |
| farbtastic.js | 7849 | V |
| gallery.js | 5543 | V |
| gallery.min.js | 3741 | V |
| image-edit.js | 40936 | V |
| image-edit.min.js | 15515 | V |
| inline-edit-post.js | 20676 | V |
| inline-edit-post.min.js | 9586 | V |
| inline-edit-tax.js | 7797 | V |
| inline-edit-tax.min.js | 2997 | V |
| iris.min.js | 23643 | V |
| language-chooser.js | 890 | V |
| language-chooser.min.js | 423 | V |
| link.js | 4873 | V |
| link.min.js | 2319 | V |
| media-gallery.js | 1303 | V |
| media-gallery.min.js | 611 | V |
| media-upload.js | 3465 | V |
| media-upload.min.js | 1152 | V |
| media.js | 6765 | V |
| media.min.js | 2439 | V |
| nav-menu.js | 62617 | V |
| nav-menu.min.js | 30785 | V |
| password-strength-meter.js | 4236 | V |
| password-strength-meter.min.js | 1123 | V |
| password-toggle.js | 1339 | V |
| password-toggle.min.js | 847 | V |
| plugin-install.js | 7086 | V |
| plugin-install.min.js | 2403 | V |
| post.js | 40494 | V |
| post.min.js | 19415 | V |
| postbox.js | 18937 | V |
| postbox.min.js | 6761 | V |
| privacy-tools.js | 11146 | V |
| privacy-tools.min.js | 5189 | V |
| revisions.js | 34729 | V |
| revisions.min.js | 18401 | V |
| set-post-thumbnail.js | 876 | V |
| set-post-thumbnail.min.js | 620 | V |
| site-health.js | 13880 | V |
| site-health.min.js | 6474 | V |
| site-icon.js | 6853 | V |
| site-icon.min.js | 2532 | V |
| svg-painter.js | 3280 | V |
| svg-painter.min.js | 1567 | V |
| tags-box.js | 11140 | V |
| tags-box.min.js | 3077 | V |
| tags-suggest.js | 5771 | V |
| tags-suggest.min.js | 2269 | V |
| tags.js | 7839 | V |
| tags.min.js | 3111 | V |
| theme-plugin-editor.js | 26176 | V |
| theme-plugin-editor.min.js | 12104 | V |
| theme.js | 57419 | V |
| theme.min.js | 27554 | V |
| updates.js | 111999 | V |
| updates.min.js | 48443 | V |
| user-profile.js | 18161 | V |
| user-profile.min.js | 7914 | V |
| user-suggest.js | 2301 | V |
| user-suggest.min.js | 676 | V |
| widgets | - | |
| widgets.js | 23098 | V |
| widgets.min.js | 12609 | V |
| word-count.js | 7696 | V |
| word-count.min.js | 1530 | V |
| xfn.js | 740 | V |
| xfn.min.js | 458 | V |