public/front/js/New Tab_files/newTab.js
/**
   * Determines the range of pinned sites surrounding the drop target cell.
   * @param aCell The drop target cell.
   * @return The range of pinned cells.
   */
Determines the range of pinned sites surrounding the drop target cell.
@param aCell The drop target cell.
@return The range of pinned cells.
Determines the range of pinned sites surrounding the drop target cell . @param aCell The drop target cell . @return The range of pinned cells .
function DropPreview_getPinnedRange(aCell) {
    let dropIndex = aCell.index;
    let range = {start: dropIndex, end: dropIndex};
    if (aCell.containsPinnedSite()) {
      let links = gPinnedLinks.links;
      while (range.start && links[range.start - 1])
        range.start--;
      let maxEnd = links.length - 1;
      while (range.end < maxEnd && links[range.end + 1])
        range.end++;
    }
    return range;
  }
function DropPreview_getPinnedRange ( aCell ) { let dropIndex = aCell . index ; let range = { start : dropIndex , end : dropIndex } ; if ( aCell . containsPinnedSite ( ) ) { let links = gPinnedLinks . links ; while ( range . start && links [ range . start - 1 ] ) range . start -- ; let maxEnd = links . length - 1 ; while ( range . end < maxEnd && links [ range . end + 1 ] ) range . end ++ ; } return range ; }
Determines the range of pinned sites surrounding the drop target cell.
Determines the range of pinned sites surrounding the drop target cell .
// We need a pinned range only when dropping on a pinned site. // Find all previous siblings of the drop target that are pinned as well. // Find all next siblings of the drop target that are pinned as well.