Forked from martinwinter/Open Safari tabs in Google Chrome
Created
February 22, 2017 00:29
-
-
Save IsmailM/5a3a1d619e6623b5bbb51fc892c5be71 to your computer and use it in GitHub Desktop.
Opens all Safari windows and tabs in Google Chrome.
This file contains 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
tell application "Safari" | |
repeat with theSafariWindow in windows | |
tell application "Google Chrome" to set theChromeWindow to make new window | |
repeat with theSafariTab in theSafariWindow's tabs | |
set theURL to URL of theSafariTab | |
tell application "Google Chrome" | |
set theChromeTab to make new tab at end of tabs of theChromeWindow | |
set URL of theChromeTab to theURL | |
end tell | |
end repeat | |
-- Close empty tab created when making new window. | |
tell application "Google Chrome" to close tab 1 of theChromeWindow | |
end repeat | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment