Chrome TextExpander Snippets
Using TextExpander and AppleScript, I can easily get the current URL of the Chrome browser. This is useful when I want to share the URL in an email, Slack or a blog post.
Simple setup to get the URL in TextExpander
I have two Snippets setup, one to get the URL and one to get the title of the page:
tell application "Google Chrome" set theURL to URL of active tab of window 1 end tell
Defined as: snippet:chrome.full.url
tell application "Google Chrome" set theTitle to TITLE of active tab of window 1 end tell
Defined as: snippet:chrome.title
Along with that setup, I have several other Snippets that references the above snippets. These are useful to have as I may want to display the URL differently depending on what applications that I am using.
Chrome Link with the Title
Very useful when the page title is suitable for a link:
Just the Chrome Link
Create the anchor tag with the Chrome URL and put the cursor where I can enter in the link text
Chrome Url with Clipboard Text
Create a link to the site using the content of the clipboard as the link text
Rich Text Format
I created a rich text snippet for email and Word Document
As you can see, it's really handy to have a couple of base snippets that are being used by other snippets.