lib/js/tabWindow.js
function makeOpenTabItem(tab) {
  var urlStr = tab.url;
  if (!urlStr) {
    console.error('malformed tab -- no URL: ', tab);
    urlStr = '';
  }
  /*
    if (!tab.title) {
      console.warn("tab missing title (ignoring...): ", tab);
    }
  */
  var tabItem = new TabItem({
    url: urlStr,
    audible: tab.audible,
    favIconUrl: tab.favIconUrl,
    open: true,
    tabTitle: _.get(tab, 'title', urlStr),
    openTabId: tab.id,
    active: tab.active,
    openTabIndex: tab.index
  });
  return tabItem;
}
function makeOpenTabItem(tab) {
  var urlStr = tab.url;
  if (!urlStr) {
    console.error('malformed tab -- no URL: ', tab);
    urlStr = '';
  }
  /*
    if (!tab.title) {
      console.warn("tab missing title (ignoring...): ", tab);
    }
  */
  var tabItem = new TabItem({
    url: urlStr,
    audible: tab.audible,
    favIconUrl: tab.favIconUrl,
    open: true,
    tabTitle: _.get(tab, 'title', urlStr),
    openTabId: tab.id,
    active: tab.active,
    openTabIndex: tab.index
  });
  return tabItem;
}
function makeOpenTabItem ( tab ) { var urlStr = tab . url ; if ( ! urlStr ) { console . error ( 'malformed tab -- no URL: ' , tab ) ; urlStr = '' ; } /*
    if (!tab.title) {
      console.warn("tab missing title (ignoring...): ", tab);
    }
  */ var tabItem = new TabItem ( { url : urlStr , audible : tab . audible , favIconUrl : tab . favIconUrl , open : true , tabTitle : _ . get ( tab , 'title' , urlStr ) , openTabId : tab . id , active : tab . active , openTabIndex : tab . index } ) ; return tabItem ; }
Initialize a TabItem from an open Chrome tab
Initialize a TabItem from an open Chrome tab