Last active
December 17, 2015 13:59
-
-
Save than/5620830 to your computer and use it in GitHub Desktop.
Open URL of Safari's active tab in Google Chrome
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
-- 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