public/js/editor.js
function updateUsername() {
      var $username = $el.findByName('username');
      if ((!usernameFocused) && (snippet.username === undefined)) {
        var username = apos.slugify($firstName.val() + $lastName.val());
        $.post(self._action + '/username-unique', { username: username }, function(data) {
          $username.val(data.username);
        });
      }
      $username.on('focus', function() {
        usernameFocused = true;
      });
    }
function updateUsername() {
      var $username = $el.findByName('username');
      if ((!usernameFocused) && (snippet.username === undefined)) {
        var username = apos.slugify($firstName.val() + $lastName.val());
        $.post(self._action + '/username-unique', { username: username }, function(data) {
          $username.val(data.username);
        });
      }
      $username.on('focus', function() {
        usernameFocused = true;
      });
    }
function updateUsername ( ) { var $username = $el . findByName ( 'username' ) ; if ( ( ! usernameFocused ) && ( snippet . username === undefined ) ) { var username = apos . slugify ( $firstName . val ( ) + $lastName . val ( ) ) ; $ . post ( self . _action + '/username-unique' , { username : username } , function ( data ) { $username . val ( data . username ) ; } ) ; } $username . on ( 'focus' , function ( ) { usernameFocused = true ; } ) ; }
Keep updating the username suggestion until they focus that field. Of course we don't mess with existing usernames.
Keep updating the username suggestion until they focus that field . Of course we don t mess with existing usernames .