B2G/gecko/browser/modules/NewTabUtils.jsm
/**
   * Gets the current set of links contained in the grid.
   * @return The links in the grid.
   */
Gets the current set of links contained in the grid.
@return The links in the grid.
Gets the current set of links contained in the grid . @return The links in the grid .
function Links_getLinks() {
    let pinnedLinks = Array.slice(PinnedLinks.links);
    let links = this._links.filter(function (link) {
      return !BlockedLinks.isBlocked(link) && !PinnedLinks.isPinned(link);
    });
    for (let i = 0; i < pinnedLinks.length && links.length; i++)
      if (!pinnedLinks[i])
        pinnedLinks[i] = links.shift();
    if (links.length)
      pinnedLinks = pinnedLinks.concat(links);
    return pinnedLinks;
  }
function Links_getLinks ( ) { let pinnedLinks = Array . slice ( PinnedLinks . links ) ; let links = this . _links . filter ( function ( link ) { return ! BlockedLinks . isBlocked ( link ) && ! PinnedLinks . isPinned ( link ) ; } ) ; for ( let i = 0 ; i < pinnedLinks . length && links . length ; i ++ ) if ( ! pinnedLinks [ i ] ) pinnedLinks [ i ] = links . shift ( ) ; if ( links . length ) pinnedLinks = pinnedLinks . concat ( links ) ; return pinnedLinks ; }
Gets the current set of links contained in the grid.
Gets the current set of links contained in the grid .
// Filter blocked and pinned links. // Try to fill the gaps between pinned links. // Append the remaining links if any.