Created
November 23, 2019 17:45
-
-
Save RSully/729e670e72f656edf3072043d4bd6303 to your computer and use it in GitHub Desktop.
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
let app = Application('Safari'); | |
app.includeStandardAdditions = true; | |
let finalText = ""; | |
for (var i = 0; i < app.windows.length; i += 1) { | |
for (var j = 0; j < app.windows[i].tabs.length; j += 1) { | |
finalText += "[" + app.windows[i].tabs[j].name() + "]: " + app.windows[i].tabs[j].url() + "\n"; | |
} | |
finalText += "\n"; | |
} | |
app.setTheClipboardTo(finalText); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment