B2G/gecko/browser/base/content/newtab/updater.js
/**
   * Removes all sites from the grid that are not in the given links array or
   * exceed the grid.
   * @param aSites The array of sites remaining in the grid.
   * @param aCallback The callback to call when finished.
   */
Removes all sites from the grid that are not in the given links array or
exceed the grid.
@param aSites The array of sites remaining in the grid.
@param aCallback The callback to call when finished.
Removes all sites from the grid that are not in the given links array or exceed the grid . @param aSites The array of sites remaining in the grid . @param aCallback The callback to call when finished .
function Updater_removeLegacySites(aSites, aCallback) {
    let batch = new Batch(aCallback);
    gGrid.sites.forEach(function (aSite) {
      if (!aSite || aSites.indexOf(aSite) != -1)
        return;
      batch.push();
      gTransformation.hideSite(aSite, function () {
        let node = aSite.node;
        node.parentNode.removeChild(node);
        batch.pop();
      });
    });
    batch.close();
  }
function Updater_removeLegacySites ( aSites , aCallback ) { let batch = new Batch ( aCallback ) ; gGrid . sites . forEach ( function ( aSite ) { if ( ! aSite || aSites . indexOf ( aSite ) != - 1 ) return ; batch . push ( ) ; gTransformation . hideSite ( aSite , function ( ) { let node = aSite . node ; node . parentNode . removeChild ( node ) ; batch . pop ( ) ; } ) ; } ) ; batch . close ( ) ; }
Removes all sites from the grid that are not in the given links array or
 exceed the grid.
Removes all sites from the grid that are not in the given links array or exceed the grid .
// Delete sites that were removed from the grid. // The site must be valid and not in the current grid. // Fade out the to-be-removed site. // Remove the site from the DOM.