Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save alexzaporozhets/4ae7e859c6468ebc7e37 to your computer and use it in GitHub Desktop.

Select an option

Save alexzaporozhets/4ae7e859c6468ebc7e37 to your computer and use it in GitHub Desktop.
Applescript to get frontmost tab’s url and title of various browsers.
# Browser
# applescript to get frontmost tab's url
# applescript to get frontmost tab's page title
# Google Chrome
tell application "Google Chrome" to return URL of active tab of front window
tell application "Google Chrome" to return title of active tab of front window
# Google Chrome Canary
tell application "Google Chrome Canary" to return URL of active tab of front window
tell application "Google Chrome Canary" to return title of active tab of front window
# Safari
tell application "Safari" to return URL of front document
tell application "Safari" to return name of front document
# Webkit
tell application "Webkit" to return URL of front document
tell application "Webkit" to return name of front document
# Opera
tell application "Opera" to return URL of front document
tell application "Opera" to return name of front document
# Camino
tell application "Camino" to return URL of current tab of front browser window
tell application "Camino" to return name of current tab of front browser window
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment