Firefox – How to move all open tabs from Safari to Firefox

browserfirefoxsafari

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.

Best Answer

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
Related Question