Created
May 2, 2023 18:32
-
-
Save iceener/026bd8938dc5a71444ae4756c4ae6140 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
tell application "System Events" | |
set frontmostApplication to name of first application process whose frontmost is true | |
set browserName to "" | |
if frontmostApplication is "Arc" then | |
tell application "Arc" to return URL of active tab of window 1 | |
else if frontmostApplication is "Google Chrome" then | |
tell application "Google Chrome" to return URL of active tab of window 1 | |
else if frontmostApplication is "Brave Browser" then | |
tell application "Brave Browser" to return URL of active tab of window 1 | |
else if frontmostApplication is "Safari" then | |
tell application "Safari" to return URL of current tab of window 1 | |
end if | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment