I’ve been using John Gruber's tip for opening the current Safari window in Chrome for when you need Flash:

I’ve also added a shortcut for opening the current Safari page in Chrome quickly. First, if you haven’t done so already, enable Safari’s Develop menu. (It’s a checkbox in the “Advanced” panel of Safari’s preferences window.) The Develop menu contains an “Open Page With” sub-menu, which lists all the web browsers you have installed on your system. Using the Keyboard Shortcuts section in System Preferences, I set a custom menu key shortcut for the command to open the current page in Google Chrome. Whenever I’m on a page in Safari with Flash content I wish to view, I hit that shortcut, and boom, Chrome launches and loads that page. (Hint: when you create the custom shortcut, and are asked for the name of the menu item, just use “Google Chrome” or “Google Chrome.app” (whichever appears in your Open Page With sub-menu).)

He later adds in an update that this behavior is broken in Safari 5.0.4, because the menu names now include browser version numbers, and that can easily get out of sync. He points to this article by TJ Luoma at TUAW on using AppleScript instead.

I’ve made one slight modification to the one TJ ends the article with, originally authored by TUAM commenter Rob, which closes the Safari window:

tell application "Safari" to set currentTab to current tab of window 1
tell application "Safari" to set currentURL to URL of currentTab
tell application "Google Chrome"
    if (exists window 1) and (URL of active tab of window 1 is "chrome://newtab/") then
        tell window 1 to set URL of active tab to currentURL
        open location currentURL
    end if
end tell
tell application "Safari" to close currentTab

I made a Services Automator workflow that runs an AppleScript, taking no input. I then used the Keyboard Preference Pane to set a keyboard shortcut to trigger that Service.

blog comments powered by Disqus