(count, currentTab, callback)
| 428 | }; |
| 429 | |
| 430 | async function forCountTabs(count, currentTab, callback) { |
| 431 | const tabs = await chrome.tabs.query(visibleTabsQueryArgs); |
| 432 | const activeTabIndex = getTabIndex(currentTab, tabs); |
| 433 | const startTabIndex = Math.max(0, Math.min(activeTabIndex, tabs.length - count)); |
| 434 | for (const tab of tabs.slice(startTabIndex, startTabIndex + count)) { |
| 435 | callback(tab); |
| 436 | } |
| 437 | } |
| 438 | |
| 439 | // Remove tabs before, after, or either side of the currently active tab |
| 440 | async function removeTabsRelative(direction, { count, tab }) { |
no test coverage detected