MCPcopy Index your code
hub / github.com/scriptscat/scriptcat / getTab

Function getTab

src/pkg/utils/utils.ts:109–111  ·  view source on GitHub ↗
(tabId: number)

Source from the content-addressed store, hash-verified

107}
108
109export async function getTab(tabId: number) {
110 return await chrome.tabs.get(tabId).catch(() => undefined);
111}
112
113// 在当前页后打开一个新页面,如果指定tabId则在该tab后打开
114export async function openInCurrentTab(url: string, tabId?: number): Promise<chrome.tabs.Tab | undefined> {

Callers 1

openInCurrentTabFunction · 0.85

Calls 1

getMethod · 0.65

Tested by

no test coverage detected