Skip to content

Instantly share code, notes, and snippets.

@mals14
Forked from chmurph2/copyURLPlusSafari.scpt
Created August 12, 2018 14:51
Show Gist options
  • Save mals14/e605e3003bf85565d420e4fa67ed3a6c to your computer and use it in GitHub Desktop.
Save mals14/e605e3003bf85565d420e4fa67ed3a6c to your computer and use it in GitHub Desktop.
In Safari, this applescript copies the title and URL of the current tab to the clipboard.
-- In Safari, this copies the Title and URL of the current tab to the clipboard.
-- Save the script in ~/Library/Scripts/Applications/Safari
-- Using QuickSilver, I assign a trigger to this script using the hotkey ⌥-C (option c), with the scope of the trigger limited to Safari.
-- Inspired by CopyURL + (http://copyurlplus.mozdev.org/)
-- Christopher R. Murphy
tell application "Safari"
set theURL to URL of front document
set theTitle to name of front document
set the clipboard to theTitle & return & theURL as string
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment