Created
August 1, 2015 11:25
-
-
Save digitalronin/9a0258d6b182f647e5d7 to your computer and use it in GitHub Desktop.
Bash script to reload the current Chrome (or Safari) browser window
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/bash | |
/usr/bin/osascript <<EOF | |
tell application "Google Chrome" | |
set docUrl to URL of (active tab of window 1) | |
set URL of (active tab of window 1) to docUrl | |
end tell | |
EOF | |
# /usr/bin/osascript <<EOF | |
# tell application "Safari" | |
# set docUrl to URL of document 1 | |
# set URL of document 1 to docUrl | |
# end tell | |
# EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How can I refresh all the tabs if multiple tabs are opened?
Also I have another instance of safari open in desktop2, I want to refresh that as well
Here is the Scenario:
On my Macbook's desktop1 - 1 Browser containing two tabs opened
On my Macbook's desktop2 - 1 Browser with only one tab
I want to refresh them all at same time, any suggestions?