Skip to content

Instantly share code, notes, and snippets.

@raghavkarol
Last active January 15, 2019 14:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save raghavkarol/ef2cc1aa05cc20ee4633 to your computer and use it in GitHub Desktop.
Save raghavkarol/ef2cc1aa05cc20ee4633 to your computer and use it in GitHub Desktop.
Applescript to reload an active tab in crome
#!/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