In my case I have many tabs opened in Safari and I want to move to Firefox. I know I can note down all the url in a text file and open all of them again one by one in another browser. But I'm looking for any shortcut way.
Asked
Active
Viewed 5,064 times
4
-
4Create bookmarks for the open tabs, export the bookmarks, then import the exported bookmarks. – Ramhound Sep 30 '14 at 13:20
-
possible duplicate of [Is there a method to export the URLs of the open tabs of a Firefox window?](http://superuser.com/questions/96739/is-there-a-method-to-export-the-urls-of-the-open-tabs-of-a-firefox-window) – Raystafarian Sep 30 '14 at 16:37
-
What OS are you running? – Adam Lui Oct 01 '14 at 10:06
-
@adaaaam Latest version on OSX – metal gear solid Oct 01 '14 at 13:31
3 Answers
6
You could use the following AppleScript:
tell application "Firefox"
activate
set newTabURLs to takeSafariTabURLs() of me
repeat with tabURL in newTabURLs
open location tabURL
delay 1
end repeat
end tell
on takeSafariTabURLs()
set tabURLs to {}
tell application "Safari"
repeat with w in windows
if name of w is not "" then --in case of zombie windows
repeat with t in tabs of w
set tabURL to URL of t
set the end of tabURLs to tabURL
end repeat
end if
end repeat
return tabURLs
end tell
end takeSafariTabURLs
John Sidiropoulos
- 71
- 1
- 2
-
very helpful, you saved my time. thank you! commenting from FF, searched in Safari :D – Itzdsp Feb 10 '19 at 01:00
-
Life saver!! Also ram saver (with help of AutoTabDiscard).. just saved 38 GB of RAM \o/ – Born2Smile Mar 10 '20 at 01:20
2
I tried following what Ramhound has mentioned, and it turned out to be very helpful. I saved all the bookmarks in a folder in Safari, and then imported the bookmarks in Firefox. It was just a simple process.
Shubhankar Raj
- 121
- 3
2
Minor changes to preserve windows. I put a gist of this as well...if others want to improve it. see https://gist.github.com/amanuel/81e70673b057687e904a248218c50ce2
tell application "Firefox"
activate
set safariWindows to getSafariWindows() of me
repeat with w in safariWindows
set newTabURLs to takeSafariTabURLs(w) of me
repeat with tabURL in newTabURLs
open location tabURL
delay 0.5
end repeat
tell application "System Events" to keystroke "n" using command down
delay 1
end repeat
end tell
on getSafariWindows()
set safariWindows to {}
tell application "Safari"
repeat with w in windows
if name of w is not "" then --in case of zombie windows
set the end of safariWindows to w
end if
end repeat
return safariWindows
end tell
end getSafariWindows
on takeSafariTabURLs(w)
set tabURLs to {}
tell application "Safari"
repeat with t in tabs of w
set tabURL to URL of t
set the end of tabURLs to tabURL
end repeat
return tabURLs
end tell
end takeSafariTabURLs
Manny Tewolde
- 21
- 2