Index

Functions

clearAllTgroupInfo

  • clearAllTgroupInfo(): Promise<[void, void, void[]]>

clearTabTgroup

  • clearTabTgroup(id?: number | number[]): Promise<void[]>
  • Clear all the tab groups.

    Parameters

    • Optional id: number | number[]

      The id(s) of the tab(s). Use the current tab if not specified.

    Returns Promise<void[]>

clearTgroups

  • clearTgroups(): Promise<void>

clearWindowTgroup

  • clearWindowTgroup(): Promise<void>

setTabTgroup

  • setTabTgroup(name: string, id?: number | number[]): Promise<void[]>
  • Set the a tab's tab group.

    Parameters

    • name: string

      The name of the tab group.

    • Optional id: number | number[]

      The id(s) of the tab(s). Use the current tab if not specified.

    Returns Promise<void[]>

setTgroups

  • setTgroups(groups: Set<string>): Promise<void>
  • Set the current window's tab groups.

    Parameters

    • groups: Set<string>

      The set of groups.

    Returns Promise<void>

setWindowTgroup

  • setWindowTgroup(name: string, id?: number): Promise<void>
  • Set the active tab group for a window.

    Parameters

    • name: string

      The name of the new active tab group.

    • Optional id: number

      The id of the window. Use the current window if not specified.

    Returns Promise<void>

tabIdsOrCurrent

  • tabIdsOrCurrent(ids?: number | number[]): Promise<number[]>
  • Return a list of tab ids.

    Parameters

    • Optional ids: number | number[]

    Returns Promise<number[]>

tabTgroup

  • tabTgroup(id?: number): Promise<string>
  • Return a tab's tab group.

    Parameters

    • Optional id: number

      The id of the tab. Use the current tab if not specified.

    Returns Promise<string>

tgroupActivate

  • tgroupActivate(name: string): Promise<Tab>
  • Activate the previously active tab in a tab group.

    Parameters

    • name: string

      The name of the tab group to switch to.

    Returns Promise<Tab>

tgroupActivateLast

  • tgroupActivateLast(): Promise<string>
  • Activate the last active tab in the last active tab group.

    Return the name of activated tab group.

    Returns Promise<string>

tgroupClearOldInfo

  • tgroupClearOldInfo(oldName: string, newName?: string, id?: number): Promise<any[]>
  • Clear stored information for a tab group.

    Parameters

    • oldName: string
    • Optional newName: string

      A name to rename the group to.

    • Optional id: number

      The id of the window. Use the current window if not specified.

      If newName is specified, add it as a stored group (if it doesn't already exist), set the current window group to it, and set the group for all tabs in the old group to it.

    Returns Promise<any[]>

tgroupHandleTabActivated

  • tgroupHandleTabActivated(activeInfo: any): Promise<any[]>
  • Handle tab activation, possibly switching tab groups.

    If the new tab is from a different tab group, set it as the new tab group, show all its tabs, and hide all tabs from the old tab group.

    Parameters

    • activeInfo: any

    Returns Promise<any[]>

tgroupHandleTabAttached

  • tgroupHandleTabAttached(tabId: number, attachInfo: any): Promise<void[]>
  • Set the tab's tab group to its window's active tab group if there is one.

    Parameters

    • tabId: number

      The id of the tab that was just attached to this window.

    • attachInfo: any

    Returns Promise<void[]>

tgroupHandleTabCreated

  • tgroupHandleTabCreated(tab: Tab): Promise<void[]>
  • Set the tab's tab group to its window's active tab group if there is one.

    Do nothing if the tab is already associated with a tab group.

    Parameters

    • tab: Tab

      The tab that was just created.

    Returns Promise<void[]>

tgroupHandleTabDetached

  • tgroupHandleTabDetached(tabId: number, detachInfo: any): Promise<any[]>
  • Handle the last tab in a tab group being moved to another window.

    Clear its information.

    Parameters

    • tabId: number
    • detachInfo: any

    Returns Promise<any[]>

tgroupHandleTabRemoved

  • tgroupHandleTabRemoved(_tabId: number, removeInfo: any): Promise<any[]>
  • Handle the last tab in a tab group being closed.

    Clear its information.

    Parameters

    • _tabId: number
    • removeInfo: any

    Returns Promise<any[]>

tgroupHandleTabUpdated

  • tgroupHandleTabUpdated(tabId: number, changeInfo: any, tab: Tab): Promise<void[]>
  • Set or clear a tab's group if it was pinned or unpinned respectively.

    Parameters

    • tabId: number

      The id of the tab that was just updated.

    • changeInfo: any
    • tab: Tab

    Returns Promise<void[]>

tgroupLastTabId

  • tgroupLastTabId(name: string, previous?: boolean): Promise<number>
  • Return the id of the last selected tab in a tab group.

    Parameters

    • name: string

      The name of the tab group.

    • Default value previous: boolean = false

      Whether to return the tab selected before the last tab.

    Returns Promise<number>

tgroupTabs

  • tgroupTabs(name: string, other?: boolean, id?: number): Promise<Tab[]>
  • Return a list of all tabs in a tab group.

    Parameters

    • name: string

      The name of the tab group.

    • Default value other: boolean = false

      Whether to return the tabs not in the tab group instead.

    • Optional id: number

      The id of the window. Use the current window if not specified.

    Returns Promise<Tab[]>

tgroups

  • tgroups(): Promise<Set<string>>
  • Return a set of the current window's tab groups (empty if there are none).

    Returns Promise<Set<string>>

windowTgroup

  • windowTgroup(id?: number): Promise<string>
  • Return the active tab group for the a window or undefined.

    Parameters

    • Optional id: number

      The id of the window. Use the current window if not specified.

    Returns Promise<string>