Forked from paulirish/open-chrome-tabs-in-safari.scpt
Last active
October 14, 2017 21:53
-
-
Save ttepasse/2a65d8d2c2567118cc70ed76fffb5f6b to your computer and use it in GitHub Desktop.
open chrome tabs in safari
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
var chrome = Application('Google Chrome'); | |
var safari = Application('Safari'); | |
safari.includeStandardAdditions = true; // Needed for openLocation() | |
chrome.windows[0].tabs().forEach(function (tab) { | |
safari.openLocation( tab.url() ); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Frankly I'm not convinced of Javascript for Automation. The function call for getting properties is awkward, the whose-Construct for filtering arrays even more so. But more annoying is the lack of discoverability. I miss IDE-like completion and something REPL-like.