Last active
January 15, 2019 14:12
-
-
Save raghavkarol/ef2cc1aa05cc20ee4633 to your computer and use it in GitHub Desktop.
Applescript to reload an active tab in crome
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
#!/usr/bin/osascript | |
-- -*- applescript -*- | |
on run argv | |
set reload_url_pattern to argv | |
tell application "Google Chrome" | |
set windowList to every window | |
repeat with aWindow in windowList | |
set tabList to every tab of aWindow | |
repeat with atab in tabList | |
if (URL of atab contains reload_url_pattern) then | |
tell atab to reload | |
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