Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add .url property for URL of active browser tab on macOS #63

Merged
merged 22 commits into from
Feb 19, 2020

Conversation

robertjkeck2
Copy link

@robertjkeck2 robertjkeck2 commented Feb 15, 2020

Using AppleScript, this PR updates the main.swift file to include the ability to get the browser URL for the active window if the browser is Safari, Google Chrome, or Brave. Firefox has a much more difficult implementation in AppleScript requiring additional permissions and could be added at a later date if desired.

Fixes #62, fixes #54, fixes #45, and fixes #20.

@sindresorhus
Copy link
Owner

Can you update index.d.ts too?

@sindresorhus
Copy link
Owner

readme.md Outdated Show resolved Hide resolved
Sources/active-win/main.swift Outdated Show resolved Hide resolved
Sources/active-win/main.swift Outdated Show resolved Hide resolved
Sources/active-win/main.swift Outdated Show resolved Hide resolved
Sources/active-win/main.swift Outdated Show resolved Hide resolved
Sources/active-win/main.swift Outdated Show resolved Hide resolved
readme.md Outdated Show resolved Hide resolved
readme.md Outdated Show resolved Hide resolved
Sources/active-win/main.swift Outdated Show resolved Hide resolved
@robertjkeck2
Copy link
Author

Thanks for the detailed review. I'm very (read: completely) new to Swift so it is helpful to have your feedback here. It's awesome to have someone who responds so quickly to OSS stuff as well!

As you'll see, I refactored a bit in alignment with what you were looking for. Let me know if there is more to add with the given changes.

Also, did you want me to update the version number and/or the description for package.json?

Sources/active-win/main.swift Show resolved Hide resolved
index.d.ts Outdated Show resolved Hide resolved
index.d.ts Outdated Show resolved Hide resolved
@sindresorhus sindresorhus changed the title Active Browser Tab URL Functionality for macOS Add .url property for URL of active browser tab on macOS Feb 17, 2020
@sindresorhus sindresorhus merged commit 47e6e44 into sindresorhus:master Feb 19, 2020
@sindresorhus
Copy link
Owner

Great :)

@robertjkeck2
Copy link
Author

Not sure this will ever be seen by anyone other than you @sindresorhus, but I wanted to say how seamless of an experience it was working with you on this PR. Extremely quick responses, thorough code review and suggestions, and a timely PR...exactly what everyone hopes for when working on OSS. Thanks for your work and keep crushing it!

@sindresorhus
Copy link
Owner

It was a pleasure working with you too 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants