tschoof Posted March 19, 2015 Share Posted March 19, 2015 (edited) The workflow takes the url of the active safari tab, and copies it to the clipboard. If you want it also throws the the page title in there. If you have selected some text, it tries to recognize that and takes that instead of the page title. It also can directly paste that whole string. That's it. Tremendously helpful for IM conversations or as a starting point for a Tweet. I have bound it like this CMD Option U to copy URL CMD Option Shift U to paste URL CMD Option K to copy Page Title and URL CMD Option Shift K to paste Page Title/Selected Text and URL Originally created by Michael Matochkin, I adapted the workflow over time and now publish it here. Original credits in the readme: Based on Alfred extensions by Luca Soldaini (original applescript by Dr. Drang) and Zibity I've used an icon from the Stylistica Icon Set That should cover it. And of course: here is the UPDATED workflow download link (see my latest comment for more info) Cheers! Timm Edited July 14, 2017 by tschoof Lecter, cands and dfay 3 Link to comment
dfay Posted April 10, 2015 Share Posted April 10, 2015 Thanks. I've tweaked the title/URL scripts to produce Markdown links instead -- replace the first tell block in each with tell application "Safari" set theURL to URL of front document set theTitle to name of front document set selectedText to (do JavaScript "(''+getSelection())" in document 1) set myCount to count (selectedText) if myCount is greater than 0 then set the clipboard to "\"[" & selectedText & "\"]" & "(" & theURL as string & ")" else set the clipboard to "[" & theTitle & "](" & theURL as string & ")" end if end tell tschoof 1 Link to comment
tschoof Posted May 26, 2015 Author Share Posted May 26, 2015 Cool, that's a nice variant! Link to comment
tschoof Posted July 5, 2017 Author Share Posted July 5, 2017 I found the script wasn't working reliably. Tweaked it a little. Also: the enabling of "Allow Javascript from Apple Events" in the Safari Dev menu is necessary for the text/title selection/copying. Cheers! DOWNLOAD Link to comment
Easytiger Posted July 5, 2017 Share Posted July 5, 2017 Great Workflow! Thanks a million. tschoof 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now