-if ( defined('IS_PROFILE_PAGE') && IS_PROFILE_PAGE )
- $is_profile_page = true;
-else
- $is_profile_page = false;
-
-/**
- * Display JavaScript for profile page.
- *
- * @since 2.5.0
- */
-function profile_js ( ) {
-?>
-<script type="text/javascript">
-(function($){
-
- function check_pass_strength () {
-
- var pass = $('#pass1').val();
- var user = $('#user_login').val();
-
- $('#pass-strength-result').removeClass('short bad good strong');
- if ( ! pass ) {
- $('#pass-strength-result').html( pwsL10n.empty );
- return;
- }
-
- var strength = passwordStrength(pass, user);
-
- if ( 2 == strength )
- $('#pass-strength-result').addClass('bad').html( pwsL10n.bad );
- else if ( 3 == strength )
- $('#pass-strength-result').addClass('good').html( pwsL10n.good );
- else if ( 4 == strength )
- $('#pass-strength-result').addClass('strong').html( pwsL10n.strong );
- else
- // this catches 'Too short' and the off chance anything else comes along
- $('#pass-strength-result').addClass('short').html( pwsL10n.short );
-
- }
-
- function update_nickname () {
-
- var nickname = $('#nickname').val();
- var display_nickname = $('#display_nickname').val();
-
- if ( nickname == '' ) {
- $('#display_nickname').remove();
- }
- $('#display_nickname').val(nickname).html(nickname);
-
- }