Created
April 9, 2016 05:56
-
-
Save brandonpittman/c471f250d1452dc1f5c1a85e75775922 to your computer and use it in GitHub Desktop.
Use TextExpander to generate an email address
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (Application('Safari Technology Preview').running()) { | |
safari = Application('Safari Technology Preview') | |
} else if (Application('Safari').running()) { | |
safari = Application('Safari') | |
} | |
_tab = safari.windows[0].currentTab() | |
if (_tab.url().match(/http.?:\/\/www/)) { | |
_url = _tab.url().split("www.") | |
} else if (_tab.url().match(/http.?:\/\//)) { | |
_url = _tab.url().split("//") | |
} else { | |
_url = _tab.url().split("www.") | |
} | |
_domain = _url[1].split(".")[0] | |
_domain + "@brandonpittman.net" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment