Created
July 19, 2017 10:25
-
-
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.
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
#!/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