Jump to content
Runar

Open current Safari tab in Chrome

Recommended Posts

Just a simple workflow to open the current Safari tab in Google Chrome. Useful if you, like me, have uninstalled flash, but occasionally need it for sites that doesn’t know about HTML5. As you probably know, Google Chrome comes bundled with flash.

 

Download here or from AlfPT (Open current Safari tab in Chrome).

Share this post


Link to post

Thanks. This one of those things I wouldn't have thought I needed, but it's actually quite handy. I use Safari as my main browser with full-on third-party script/frame/embed/object blocking via JavaScript Blocker. Sometimes it's easier just to open a page in Chrome than to try to figure out which blocked script is breaking the page.

Share this post


Link to post

This is great! Thanks :D

For me is the exact opposite. I use Safari with all pluings disabled and almost no extension, I must open Chrome for pages that necessitate any plugin or I want to use a particular Chrome extension.

Share this post


Link to post

Which changes should be made to the script, to achieve the same result with Firefox? Replacing "Google Chrome" with "Firefox" opens Firefox but not the URL. (I'm a script newbie.) Any ideas? Thank you.

Share this post


Link to post

Which changes should be made to the script, to achieve the same result with Firefox? Replacing "Google Chrome" with "Firefox" opens Firefox but not the URL. (I'm a script newbie.) Any ideas? Thank you.

 

You can try to take a look a my workflow Send URL, it can open the url in a variety of apps (and in addition to Safari can also get the url from Chrome, Opera, Camino, iCab and Omniweb the browser just have to be the frontmost application)

 

 https://github.com/aiyodk/Alfred-Extensions/raw/master/AlfredApp_2.x/Send-URL/Send-URL.alfredworkflow

Share this post


Link to post

You can try to take a look a my workflow Send URL, it can open the url in a variety of apps (and in addition to Safari can also get the url from Chrome, Opera, Camino, iCab and Omniweb the browser just have to be the frontmost application)

 

 https://github.com/aiyodk/Alfred-Extensions/raw/master/AlfredApp_2.x/Send-URL/Send-URL.alfredworkflow

 

Perfect. Thank you!

Share this post


Link to post

I registered for the forum just to thank you for this. I prefer Safari as a browser, but when I'm troubleshooting a website I prefer to inspect elements in Chrome. This may only eliminate a few keystrokes, but they were keystrokes that I hated. Kudos.

Share this post


Link to post

Hi,

 

Unless Chrome is already opened, the workflow opens Chrome, but does not open the Safari url/active tab.

 

Is this a problem with the workflow, or something on my end?  :ph34r:

 

I use the below Applescript in a workflow to open the front Safari tab in Chrome and it seems to work fine for me whether Chrome is active or not.

 

I can't recall where I found this, or I would give credit, but I have been using this since the early days of Alfred 1.

on alfred_script(q)
tell application "Safari" to set currentURL to URL of current tab of window 1
tell application "Google Chrome"
	activate
	if not (exists window 1) then make new window
	tell window 1
		if URL of active tab is "chrome://newtab/" then
			set URL of active tab to currentURL
		else
			make new tab with properties {URL:currentURL}
		end if
	end tell
end tell
end alfred_script

Share this post


Link to post

Thanks for the script, Weaselboy. However, I managed to solve my problem in a similar fashion to you, by using the code from a V1 extension. Specifically, Daniel Kramer's Alfred V1 'open in chrome' extension.

 

 

 
property theURL : “”
 
tell application “Safari”
 
set theURL to URL of current tab of window 1
 
end tell
 
tell application “Google Chrome”
 
if (count of windows) is 0
make new window
else
make new tab at end of tabs of front window
end if
 
delay 1
 
set URL of active tab of front window to theURL
 
activate
 
end tell

 

 

If anyone wants to save themselves a couple of minutes, the workflow I cobbled together with the above code is here: http://d.pr/f/fVTW

Edited by Barrierfreeman

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×