online/src/js/editors.js
function getShortTitle (title) {
  // Get just the file name
  var lastSlash = title.lastIndexOf("/");
  if (lastSlash !== -1) {
    title = title.substr(lastSlash + 1);
  }

  if (title.length > 15) {
    // It's still too long, so, just return the first 10 characters
    title = title.substr(0, 10) + "...";
  }

  return title;
}
function getShortTitle (title) {
  // Get just the file name
  var lastSlash = title.lastIndexOf("/");
  if (lastSlash !== -1) {
    title = title.substr(lastSlash + 1);
  }

  if (title.length > 15) {
    // It's still too long, so, just return the first 10 characters
    title = title.substr(0, 10) + "...";
  }

  return title;
}
function getShortTitle ( title ) { // Get just the file name var lastSlash = title . lastIndexOf ( "/" ) ; if ( lastSlash !== - 1 ) { title = title . substr ( lastSlash + 1 ) ; } if ( title . length > 15 ) { // It's still too long, so, just return the first 10 characters title = title . substr ( 0 , 10 ) + "..." ; } return title ; }
Returns a short version of the given title text, to better fit in a tab

@param {string} title
@returns {string}
Returns a short version of the given title text to better fit in a tab