Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nilswindisch/5194575 to your computer and use it in GitHub Desktop.
Save nilswindisch/5194575 to your computer and use it in GitHub Desktop.
Returns the URL and Title of the foremost Google Chrome tab in MediaWiki Syntax to the clipboard.
-- quick and dirty, but works with latest Google Chrome and Mac OS X as of march 2013
set theReturn to ""
tell application "Google Chrome"
set frontIndex to active tab index of front window
set theUrl to URL of tab frontIndex of front window
set theTitle to title of tab frontIndex of front window
set theReturn to theReturn & "[" & theUrl & " " & theTitle & "]"
end tell
set the clipboard to theReturn
--return theReturn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment