Last active
March 6, 2018 10:34
-
-
Save muratgozel/1eb7fd59b64075b80b2b9fa2364b49d4 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
# Don't forget to run "sudo chmod a+x filename" to give this script neccessary permissions in order to work properly. | |
osascript <<EOD | |
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 "localhost") then | |
tell atab to reload | |
end if | |
end repeat | |
end repeat | |
end tell | |
EOD |
This file contains hidden or 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 | |
osascript <<EOD | |
tell application "Safari" | |
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 "localhost") then | |
tell atab to do javascript "window.location.reload()" | |
end if | |
end repeat | |
end repeat | |
end tell | |
EOD |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment