Skip to content

Instantly share code, notes, and snippets.

@iceener
Created May 2, 2023 18:31
Show Gist options
  • Save iceener/3075607e840b4e52b950abb4a50cafd0 to your computer and use it in GitHub Desktop.
Save iceener/3075607e840b4e52b950abb4a50cafd0 to your computer and use it in GitHub Desktop.
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 title of active tab of window 1
else if frontmostApplication is "Google Chrome" then
tell application "Google Chrome" to return title of active tab of window 1
else if frontmostApplication is "Brave Browser" then
tell application "Brave Browser" to return title of active tab of window 1
else if frontmostApplication is "Safari" then
tell application "Safari" to return name 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