lib/content.js
function getTitle(content, tag) {
  if (!content) {
    return;
  }
  var ts = content.indexOf(tag);
  if (ts < 0) {
    return;
  }
  var te = content.indexOf('>', ts);
  var cs = content.indexOf('<', te + 1);
  var title = content.substring(te + 1, cs);
  return title.trim();
}
function getTitle(content, tag) {
  if (!content) {
    return;
  }
  var ts = content.indexOf(tag);
  if (ts < 0) {
    return;
  }
  var te = content.indexOf('>', ts);
  var cs = content.indexOf('<', te + 1);
  var title = content.substring(te + 1, cs);
  return title.trim();
}
function getTitle ( content , tag ) { if ( ! content ) { return ; } var ts = content . indexOf ( tag ) ; if ( ts < 0 ) { return ; } var te = content . indexOf ( '>' , ts ) ; var cs = content . indexOf ( '<' , te + 1 ) ; var title = content . substring ( te + 1 , cs ) ; return title . trim ( ) ; }
Get an HTML title the old-fashioned way.
Get an HTML title the old - fashioned way .