Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Keyboard shortcut for opening current Safari page in Google Chrome Apps
Assigning a shortcut to open Safari's current page in Google is simple but breaks frequently, because the menu item name includes Chrome's version number. The simple fix is to use an Apple Script like Mike Hardy's as a proxy to Google Chrome. I'm describing this in more detail in this blog post, which is also reproduced below.

Currently shipping Macs come without Adobe Flash Player preinstalled, and I’ve been running that same setup without Flash for quite a while now myself. More and more webpages work fine without Flash and only the occasional video requires it. When that is the case, I simply go to the Develop menu (enable it in Safari's Advanced preferences if you don’t have it) and select Open Page With > Google Chrome.app (20.0.1132.21). Since Google Chrome comes with Flash preinstalled, this is a simple way to switch to a Flash-enabled browser.

Now, rather than choosing Chrome from the menu it would be nice to assign a keyboard shortcut for this menu item, and this is actually quite simple: Open the keyboard preference pane in System Preferences, select ‘Application Shortcuts’ and add a shortcut for the Google Chrome.app (20.0.1132.21) menu item to Safari. However, the problem here is that the menu item contains the version number of Chrome and since Chrome updates frequently (and in the background), you’ll find yourself with a broken shortcut very soon.

The fix for this is a little Apple Script OpenURLInNewChromeWindow.app by Mike Hardy which tells Google Chrome to open the URL via an Apple Script command. If you run this script once, it will register itself as a application that can handle URLs, and will therefore also appear in the list of browsers under Open Page With. Opening a page with this script will open the current page in Chrome just like before, but the menu item will stay the same no matter which version of Chrome you have installed. You simply assign the shortcut to this "browser" instead of the ever-changing Chrome.

As an added benefit (and actually the reason Mike Hardy wrote the script in the first place) is that the page opens in a new window and not in a new tab (which can be quite annoying when using virtual screens). See Mike’s blog post for more details how to use his script in that context.
    •    
  • Currently 3.75 / 5
  You rated: 1 / 5 (8 votes cast)
 
[7,040 views]  

Keyboard shortcut for opening current Safari page in Google Chrome | 8 comments | Create New Account
Click here to return to the 'Keyboard shortcut for opening current Safari page in Google Chrome ' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Keyboard shortcut for opening current Safari page in Google Chrome
Authored by: davidh on Jun 12, '12 09:24:27AM
I use a free Safari Extension called Eject to Flash to do the same thing. I thought I would mention it as a possible alternative.

[ Reply to This | # ]
Keyboard shortcut for opening current Safari page in Google Chrome
Authored by: vertigo on Jun 12, '12 12:34:44PM

Another hassle-free way to dealing with this is the Safari extension "Eject To Flash", which will allow you to open a page in Chrome either by clicking a menu button or a keyboard command (Command + E).

A nice feature is that you can also set it to close the tab in Safari at the same time.

My only gripe is that, if Chrome wasn't already open, it will create a blank tab as well as open your link. Haven't figured out a way for Chrome to not always open a blank tab when opening an external link for the first time. If Chrome is already open (but with no windows open), it'll work as expected.

http://www.relaxedapps.com/eject/



[ Reply to This | # ]
Keyboard shortcut for opening current Safari page in Google Chrome
Authored by: yesiamnhoj on Jun 12, '12 04:20:34PM

My only gripe is that, if Chrome wasn't already open, it will create a blank tab as well as open your link.

If you mean from Mike Hardy's script try the modified version below.

Best wishes
John M

on open location theURL
	tell application "System Events"
	-- Check if Chrome is running if so make a new window.
		if name of processes contains "Google Chrome" then
			tell application "Google Chrome" to make new window
		end if
	end tell
	tell application "/Applications/Google Chrome.app"
		activate
		delay 0.1 -- The application needs some time to set up the first window if starting from scratch.
		set URL of active tab of first window to theURL
	end tell
end open location[code]


[ Reply to This | # ]
Keyboard shortcut for opening current Safari page in Google Chrome
Authored by: vertigo on Jun 13, '12 03:04:19AM

No, sorry, I meant if you use Eject To Flash you get the extra blank tab when Chrome opens for the first time.



[ Reply to This | # ]
Keyboard shortcut for opening current Safari page in Google Chrome
Authored by: Alphaman on Jun 13, '12 11:22:24AM

I created an Automator service. Pretty simple, really:

1. Get Current Webpage from Safari

2. Run Shell Script:
for f in "$@"
do
open -a "Google Chrome" --args "$f"
done


That's it. I just highlight the URL in the address bar, right-click, and open in Chrome. Easy peasy… :)



[ Reply to This | # ]
Keyboard shortcut for opening current Safari page in Google Chrome
Authored by: peterhoneyman on Jun 13, '12 11:37:54AM

Useful! Thanks!



[ Reply to This | # ]
Keyboard shortcut for opening current Safari page in Google Chrome
Authored by: openmind on Jun 14, '12 10:17:11AM

Even simpler if you use LaunchBar (you should be if you're into shortcuts).
1. Cmd-L to select the url
2. long press cmd-Space to send to LB as action
3. type "CH" or whatever your abbreviation for Chrome is.



[ Reply to This | # ]
Keyboard shortcut for opening current Safari page in Google Chrome
Authored by: drfrot on Jun 19, '12 07:31:06AM

Similarly, I'd recommend using Quicksilver to do this. Assigning a keyboard shortcut trigger is a piece of cake. Any time I'm in Safari and I encounter flash, Chrome is merely "Ctrl-Alt-Cmd-C" away!



[ Reply to This | # ]