Skip to content

Instantly share code, notes, and snippets.

@davea
Created July 19, 2017 10:25
Show Gist options
  • Save davea/07a7456da15eeb8c47f1fb66e4b96c54 to your computer and use it in GitHub Desktop.
Save davea/07a7456da15eeb8c47f1fb66e4b96c54 to your computer and use it in GitHub Desktop.
Simple script to reload tabs in Chrome (on macOS) that match a certain keyword.
#!/bin/sh
set -e
osascript<<EOF
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 "$1") then
tell atab to reload
end if
end repeat
end repeat
end tell
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment