Created
February 25, 2020 18:14
-
-
Save edenwaith/6df63733b330d7fe39bcf4cea83ddf78 to your computer and use it in GitHub Desktop.
AppleScript to close all Atlassian-related tabs 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
-- File: CloseAcmeTabs.scpt | |
-- Description: Iterate through all open Google Chrome windows and close any Atlassian-related tabs. | |
-- Author: Chad Armstrong | |
-- Date: 25 February 2020 | |
tell application "Google Chrome" | |
-- Iterate through every Chrome tab and find any Atlassian pages (JIRA, Confluence) | |
set windowList to every tab of every window whose (URL starts with "https://wiki.acme.com/") or (URL starts with "https://jira.acme.com/") | |
set tabsToClose to 0 | |
repeat with tabList in windowList | |
set tabList to tabList as any | |
repeat with currentTab in tabList | |
set currentTab to currentTab as any | |
delete currentTab | |
set tabsToClose to tabsToClose + 1 | |
end repeat | |
end repeat | |
log "There were " & tabsToClose & " Acme tabs closed." | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment