Browse the docs

Work with tabs and windows

Lists, opens, focuses, closes, reloads, moves and groups tabs in any connected browser.

op tabs

Details #

op is one of:

  • list: [{tabId, windowId, url, title, active, pinned, audible, browser}], filtered by match.

  • open (with url, background), newWindow (private), navigate (url).

  • focus, close, reload, back, forward, duplicate, pin, unpin, mute, unmute.

  • dedupe: close duplicate tabs, keeping the oldest.

  • move (toWindow, index), and group (name, color, Chrome family).

Ops that act on tabs take match with all: true, so "close every tab on twitter.com" is one step. Without match or tab they act on the front tab.

Parameters #

ParameterTypeRequiredValuesWhat it does
opone ofYeslist open focus close reload back forward duplicate pin unpin mute unmute dedupe move newWindow group navigateRequired.
allyes / no
backgroundyes / no
browserone ofsafari chrome front
colortext
indexnumber
intotextThe variable that receives the result.
matchrecordbrowser title url, all: Which tabs.
nametext
privateyes / no
sampleany value
tabany value
toWindownumber
urltext, background, private, toWindow, index, name, color.

Every step also accepts label, onFailure, timeout and dryRunSafe.

Examples #

Close every tab on twitter.com
Do
  1. Close every tab on https://twitter.com/*
Open in Switchboard to try it

Gotchas #

  • Private windows are left out unless Settings ▸ Browsers allows them.