Created
October 14, 2017 21:55
-
-
Save piercemoore/45b4b717512812a985318d9e0f93911e to your computer and use it in GitHub Desktop.
Automator script to get URLs of all tabs in a safari window
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
var Chrome = Application('Google Chrome'); | |
var Safari = Application('Safari'); | |
Safari.includeStandardAdditions = true; | |
Chrome.includeStandardAdditions = true; | |
var urls = []; | |
Safari.windows[0].tabs().forEach(function(tab) { | |
console.log(tab.url()) | |
urls.push(tab.url()) | |
}) | |
urls | |
// console.log(safari.windows[0]); | |
//console.log(chrome.windows[0]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Links: