Adobe Flash is a notorious resource and battery hog. I’m currently seeing if I can get by in Safari on my MacBook without it. I had been using an extension to selectively enable Flash in Safari, but I wanted to see if I could live without Flash in Safari entirely, and just jump over to Chrome (which comes packaged with Flash) when I absolutely needed to see a page that used Flash. All of the solutions that I found online involved Applescripts that were throwing errors for me, until I jumped into the Keyboard Maestro Yahoo Group and found a script that worked. I’ve paired that with Keyboard Maestro, and can now use a keystroke to open the currently active Safari tab in Chrome.
I found the working script in message 6596. A user there, Chris Cioffi, offered the following script:
tell application "Safari" to set _url to URL of front document
try
_url
on error
error "Problem with variable: _url - probably undefined."
end try
do shell script "open -a '/Applications/Google Chrome.app' " & quoted form of _url
That script tried to open Chrome in my Windows virtual machine, and not the Mac app, so I had to tweak it slightly, as seen below. I put the revised script into a Keyboard Maestro macro, as follows (downlink link at the bottom of this article):

Now, when I’m in Safari and need to use Flash on a page, I hit CTRL+OPTION+COMMAND+H, and the page that is open in Safari automatically opens in Chrome.
To use the macro, you can download a zip file here. Unzip the file, and then double click on the .kmmacros file within it. That will install the macro into Keyboard Maestro, assuming you own it. You may need to change the keyboard shortcut if it conflicts with a shortcut that you’re already using.
peternlewiPeter N Lewis says:
You can actually do this with a simple action in Keyboard Maestro:
Open URL %SafariURL% with Google Chrome
September 14, 2014 — 9:43 pm
Evan Kline says:
Thank ou, Peter. I’m sure I’m just being dense, but what kind of action is that? I set it up as an Applescript action, and nothing happens.
September 15, 2014 — 7:31 am
Peter N Lewis says:
I can’t post an image here as far as I can tell, but I’ve put the image on the forum at
http://forum.keyboardmaestro.com/t/open-url-in-chrome/432
Basically, it just uses the Open URL action, and the SafariURL text token.
September 15, 2014 — 7:43 am
Richard Watt says:
He’s referring to the built-in Keyboard Maestro text tokens that already grab the URL or Title. So you would have the single action that he shows in his link. The same works the other way around using %ChromeURL%. No scripting is needed.
The complete list of tokens in Keyboard Maestro are here:
http://www.keyboardmaestro.com/documentation/6/tokens.html
September 15, 2014 — 7:13 pm
Miraz Jordan says:
I have a similar KM macro. I also sometimes just set the User Agent set to iPad. You may have to enable the Developer menu in Safari (Prefs – Advanced – Show Develop menu) to allow this.
Here’s my KM script to switch User Agent to iPad:
Select Menu Item in Safari
Select: Develop ⇢ User Agent ⇢ Safari iOS 7 — iPad
It frequently works very nicely and saves the trip to Chrome. I still use Chrome for websites such as Hulu and when the Safari trick fails.
September 14, 2014 — 11:27 pm
Evan Kline says:
Thanks, Miraz! I’ll check that one out.
September 15, 2014 — 7:33 am
Steven says:
Nice little hack … thanks for sharing this man!
October 5, 2014 — 11:29 pm