Last active
October 26, 2022 07:27
-
-
Save rgbink/046e52569bc29a630387c322b75d2711 to your computer and use it in GitHub Desktop.
Applescript to Close particular tab(s) in Google Chrome
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
tell application "Google Chrome" | |
-- edit the following url to be as specific or generic as you wish | |
-- in my functioning script I've added the particular spreadsheet that I wish to close | |
set windowList to every tab of every window whose URL starts with "https://docs.google.com/spreadsheets/" | |
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment