({ count, tab })
| 300 | }), |
| 301 | |
| 302 | moveTabToNewWindow({ count, tab }) { |
| 303 | // TODO(philc): Switch to the promise API of chrome.tabs.query. |
| 304 | chrome.tabs.query(visibleTabsQueryArgs, function (tabs) { |
| 305 | const activeTabIndex = getTabIndex(tab, tabs); |
| 306 | const startTabIndex = Math.max(0, Math.min(activeTabIndex, tabs.length - count)); |
| 307 | [tab, ...tabs] = tabs.slice(startTabIndex, startTabIndex + count); |
| 308 | chrome.windows.create({ tabId: tab.id, incognito: tab.incognito }, function (window) { |
| 309 | chrome.tabs.move(tabs.map((t) => t.id), { windowId: window.id, index: -1 }); |
| 310 | }); |
| 311 | }); |
| 312 | }, |
| 313 | |
| 314 | nextTab(request) { |
| 315 | return selectTab("next", request); |
nothing calls this directly
no test coverage detected