Skip to content

Instantly share code, notes, and snippets.

@than
Last active December 17, 2015 13:59
Show Gist options
  • Save than/5620830 to your computer and use it in GitHub Desktop.
Save than/5620830 to your computer and use it in GitHub Desktop.
Open URL of Safari's active tab in Google Chrome
-- a quick and dirty way to open sites that require Flash in Google Chrome
-- "Going Flash-Free on Mac OS X, and How to Cheat When You Need It" ⇒ http://daringfireball.net/2010/11/flash_free_and_cheating_with_google_chrome
tell application "Safari"
set currentTab to current tab of front window
set currentURL to currentTab's URL
end tell
tell application "Google Chrome"
activate
if (count every window) = 0 then
make new window
end if
tell front window
make new tab
set URL of active tab to currentURL
end tell
end tell
tell application "Safari"
activate
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment