Skip to content

Instantly share code, notes, and snippets.

@joelpalmer
Created May 3, 2021 19:04
Show Gist options
  • Save joelpalmer/90bb359a769420c055481e7b6beed87e to your computer and use it in GitHub Desktop.
Save joelpalmer/90bb359a769420c055481e7b6beed87e to your computer and use it in GitHub Desktop.
Activate a browser tab via title text
on run argv
tell application "Brave Browser"
repeat with w in (windows)
set j to 0
repeat with t in (tabs of w)
set j to j + 1
if title of t contains (item 1 of argv) then
set (active tab index of w) to j
return
end if
end repeat
end repeat
end tell
end run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment