Skip to content

Commit e7265bc

Browse files
committed
Add support for getting the URL of the active tab in Arc on macOS
1 parent 5d13a66 commit e7265bc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Sources/ActiveWinCLI/main.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import AppKit
22

33
func getActiveBrowserTabURLAppleScriptCommand(_ appId: String) -> String? {
44
switch appId {
5-
case "com.google.Chrome", "com.google.Chrome.beta", "com.google.Chrome.dev", "com.google.Chrome.canary", "com.brave.Browser", "com.brave.Browser.beta", "com.brave.Browser.nightly", "com.microsoft.edgemac", "com.microsoft.edgemac.Beta", "com.microsoft.edgemac.Dev", "com.microsoft.edgemac.Canary", "com.mighty.app", "com.ghostbrowser.gb1", "com.bookry.wavebox", "com.pushplaylabs.sidekick", "com.operasoftware.Opera", "com.operasoftware.OperaNext", "com.operasoftware.OperaDeveloper", "com.vivaldi.Vivaldi":
5+
case "com.google.Chrome", "com.google.Chrome.beta", "com.google.Chrome.dev", "com.google.Chrome.canary", "com.brave.Browser", "com.brave.Browser.beta", "com.brave.Browser.nightly", "com.microsoft.edgemac", "com.microsoft.edgemac.Beta", "com.microsoft.edgemac.Dev", "com.microsoft.edgemac.Canary", "com.mighty.app", "com.ghostbrowser.gb1", "com.bookry.wavebox", "com.pushplaylabs.sidekick", "com.operasoftware.Opera", "com.operasoftware.OperaNext", "com.operasoftware.OperaDeveloper", "com.vivaldi.Vivaldi", "company.thebrowser.Browser":
66
return "tell app id \"\(appId)\" to get the URL of active tab of front window"
77
case "com.apple.Safari", "com.apple.SafariTechnologyPreview":
88
return "tell app id \"\(appId)\" to get URL of front document"
@@ -88,13 +88,13 @@ let enableOpenWindowsList = CommandLine.arguments.contains("--open-windows-list"
8888

8989
// Show accessibility permission prompt if needed. Required to get the complete window title.
9090
if !AXIsProcessTrustedWithOptions(["AXTrustedCheckOptionPrompt": true] as CFDictionary) {
91-
print("active-win requires the accessibility permission in “System PreferencesSecurity & Privacy › Privacy › Accessibility”.")
91+
print("active-win requires the accessibility permission in “System SettingsPrivacy & Security › Accessibility”.")
9292
exit(1)
9393
}
9494

9595
// Show screen recording permission prompt if needed. Required to get the complete window title.
9696
if !disableScreenRecordingPermission && !hasScreenRecordingPermission() {
97-
print("active-win requires the screen recording permission in “System PreferencesSecurity & Privacy › Privacy › Screen Recording”.")
97+
print("active-win requires the screen recording permission in “System SettingsPrivacy & Security › Screen Recording”.")
9898
exit(1)
9999
}
100100

0 commit comments

Comments
 (0)