Skip to content

Instantly share code, notes, and snippets.

@masnick
Created December 27, 2019 21:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save masnick/7b1896c7eb4375b18ea4a7dcfea15181 to your computer and use it in GitHub Desktop.
Save masnick/7b1896c7eb4375b18ea4a7dcfea15181 to your computer and use it in GitHub Desktop.
Open Safari tabs in Google Chrome
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