Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: sindresorhus/get-windows
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v7.3.0
Choose a base ref
...
head repository: sindresorhus/get-windows
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v7.4.0
Choose a head ref
  • 2 commits
  • 4 files changed
  • 2 contributors

Commits on Jun 10, 2021

  1. Unverified

    The committer email address is not verified.
    Copy the full SHA
    8df4788 View commit details
  2. 7.4.0

    sindresorhus committed Jun 10, 2021
    Copy the full SHA
    2de7f94 View commit details
Showing with 4 additions and 4 deletions.
  1. +1 −1 Sources/active-win/main.swift
  2. +1 −1 index.d.ts
  3. +1 −1 package.json
  4. +1 −1 readme.md
2 changes: 1 addition & 1 deletion Sources/active-win/main.swift
Original file line number Diff line number Diff line change
@@ -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", "Mighty", "Ghost Browser", "Wavebox", "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", "Mighty", "Ghost Browser", "Wavebox", "Sidekick", "Opera", "Vivaldi":
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"
2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
@@ -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), Mighty, Ghost Browser, WaveBox, 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), Mighty, Ghost Browser, WaveBox, Sidekick, Opera, or Vivaldi.
*/
url?: string;
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "active-win",
"version": "7.3.0",
"version": "7.4.0",
"description": "Get metadata about the active window (title, id, bounds, owner, URL, etc). Works on macOS, Linux, Windows.",
"license": "MIT",
"repository": "sindresorhus/active-win",
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
@@ -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), Mighty, Ghost Browser, Wavebox, 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), Mighty, Ghost Browser, Wavebox, Sidekick, Opera, or Vivaldi *(macOS only)*
- `memoryUsage` *(number)* - Memory usage by the window owner process

## OS support