Last active
April 24, 2016 12:52
-
-
Save HR/a32061e8c72451e448a6a166fd7da3d3 to your computer and use it in GitHub Desktop.
Close tabs starting with a URL in Chrome Applescript
This file contains hidden or 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 | |
set passedInURL to (item 1 of argv) | |
tell application "Google Chrome" | |
set windowList to every tab of every window whose URL starts with passedInURL | |
repeat with tabList in windowList | |
set tabList to tabList as any | |
repeat with tabItr in tabList | |
set tabItr to tabItr as any | |
delete tabItr | |
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