Created
December 7, 2011 01:09
-
-
Save gruber/1440914 to your computer and use it in GitHub Desktop.
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
# Copy the URL or tweet ID for a tweet, and the script will send it to Aaron's Twitter Viewer | |
set _old_delims to AppleScript's text item delimiters | |
set AppleScript's text item delimiters to "/" | |
set _tweet_url to get the clipboard | |
set _tweet_id to last text item of _tweet_url | |
try | |
get _tweet_id as integer | |
on error | |
display alert "“" & _tweet_url & "” doesn't look like a valid tweet ID." | |
return | |
end try | |
set AppleScript's text item delimiters to _old_delims | |
open location "http://twitter.theinfo.org/" & _tweet_id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment