Created
December 27, 2019 21:18
-
-
Save masnick/7b1896c7eb4375b18ea4a7dcfea15181 to your computer and use it in GitHub Desktop.
Open Safari tabs in Google Chrome
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use AppleScript version "2.4" -- Yosemite (10.10) or later | |
use scripting additions | |
set url_list to {} | |
tell application "Safari" | |
set w to window 1 | |
try | |
repeat with t in (tabs of w) | |
set TabURL to (URL of t) | |
copy TabURL to the end of url_list | |
end repeat | |
end try | |
end tell | |
tell application "Google Chrome" | |
set w to make new window | |
repeat with u in url_list | |
tell w | |
set newTab to make new tab with properties {URL:u} | |
end tell | |
end repeat | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment