Skip to content

Instantly share code, notes, and snippets.

@chew-z
Created February 18, 2016 02:59
Show Gist options
  • Save chew-z/a88c86c9a7d8cb18401d to your computer and use it in GitHub Desktop.
Save chew-z/a88c86c9a7d8cb18401d to your computer and use it in GitHub Desktop.
Applescript for Automator activating Google Chrome (with built-in DNS disabled).
on run {input, parameters}
if application "Google Chrome" is running then
tell application "Google Chrome" to tell window 1 to close (tabs whose id is not (get id of active tab))
tell application "Google Chrome"
tell window 1 to make new tab with properties {URL:"http://localhost:8123/Chrome.html"}
end tell
else
do shell script "open -n -a 'Google Chrome' --args --disable-async-dns"
end if
tell application "Google Chrome" to activate
return input
end run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment