Skip to content

Instantly share code, notes, and snippets.

@Epictetus
Forked from ernesto-jimenez/gist:2286214
Created April 2, 2012 19:00
Show Gist options
  • Save Epictetus/2286344 to your computer and use it in GitHub Desktop.
Save Epictetus/2286344 to your computer and use it in GitHub Desktop.
Automatically reload your active tab in Chrome. See the comments for instructions.
#!/usr/bin/env osascript
#
# This AppleScript reloads Google Chrome. It can be used in combination kicker
# gem to automatically reload google chrome when you save a file from your app.
#
# Usage for a rails app:
# 1) Place this file in $RAILS_ROOT/script/reload_chrome
# 2) Install the kicker gem: gem install kicker
# 3) Run: kicker -e script/reload_chrome app public
#
# Now, every time you save a file in the folders app or public Chrome will
# reload your active tab.
tell application "/Applications/Google Chrome.app"
tell active tab of first window
reload
end tell
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment