Created
May 3, 2021 19:04
-
-
Save joelpalmer/90bb359a769420c055481e7b6beed87e to your computer and use it in GitHub Desktop.
Activate a browser tab via title text
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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