Skip to content

Commit

Permalink
Add support for Ghost Browser and WaveBox for url property (macOS) (#…
Browse files Browse the repository at this point in the history
…108)

Co-authored-by: Sindre Sorhus <[email protected]>
  • Loading branch information
wrgoto and sindresorhus authored May 15, 2021
1 parent 591f228 commit d74a0a1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Sources/active-win/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import AppKit

func getActiveBrowserTabURLAppleScriptCommand(_ appName: String) -> String? {
switch appName {
case "Google Chrome", "Google Chrome Beta", "Google Chrome Dev", "Google Chrome Canary", "Brave Browser", "Brave Browser Beta", "Brave Browser Nightly", "Microsoft Edge", "Microsoft Edge Beta", "Microsoft Edge Dev", "Microsoft Edge Canary", "Sidekick", "Opera":
case "Google Chrome", "Google Chrome Beta", "Google Chrome Dev", "Google Chrome Canary", "Brave Browser", "Brave Browser Beta", "Brave Browser Nightly", "Microsoft Edge", "Microsoft Edge Beta", "Microsoft Edge Dev", "Microsoft Edge Canary", "Ghost Browser", "Wavebox", "Sidekick", "Opera":
return "tell app \"\(appName)\" to get the URL of active tab of front window"
case "Safari":
return "tell app \"Safari\" to get URL of front document"
Expand Down
2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ declare namespace activeWindow {
owner: MacOSOwner;

/**
URL of the active browser tab if the active window is Safari, Chrome (includes Beta, Dev, and Canary), Edge (includes Beta, Dev, and Canary), Brave (includes Beta and Nightly), Sidekick, or Opera.
URL of the active browser tab if the active window is Safari, Chrome (includes Beta, Dev, and Canary), Edge (includes Beta, Dev, and Canary), Brave (includes Beta and Nightly), Ghost Browser, WaveBox, Sidekick, or Opera.
*/
url?: string;
}
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Returns a `Promise<object>` with the result, or `Promise<undefined>` if there is
- `processId` *(number)* - Process identifier
- `bundleId` *(string)* - Bundle identifier *(macOS only)*
- `path` *(string)* - Path to the app
- `url` *(string?)* - URL of the active browser tab if the active window is Safari, Chrome (includes Beta, Dev, and Canary), Edge (includes Beta, Dev, and Canary), Brave (includes Beta and Nightly), Sidekick, or Opera *(macOS only)*
- `url` *(string?)* - URL of the active browser tab if the active window is Safari, Chrome (includes Beta, Dev, and Canary), Edge (includes Beta, Dev, and Canary), Brave (includes Beta and Nightly), Ghost Browser, Wavebox, Sidekick, or Opera *(macOS only)*
- `memoryUsage` *(number)* - Memory usage by the window owner process

## OS support
Expand Down

0 comments on commit d74a0a1

Please sign in to comment.