Created
February 12, 2014 19:35
-
-
Save sillygwailo/8962916 to your computer and use it in GitHub Desktop.
Open Tweets in Tweetbot
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
// javascript:l%20=%20document.location.href;l%20=%20l.replace(%27https://twitter.com/%27,%20%27tweetbot://%27);l%20=%20l.replace(%27statuses%27,%20%27status%27);l%20=%20l.replace(%27http://twitter.com/%27,%20%27tweetbot://%27);l%20=%20l.replace(%27http://mobile.twitter.com/%27,%20%27tweetbot://%27);l%20=%20l.replace(%27https://mobile.twitter.com/%27,%20%27tweetbot://%27);window.location=l; | |
// | |
// based on http://www.macstories.net/tutorials/convert-twitter-com-urls-to-tweetbot-links/ | |
// (ported to JavaScript; the bookmarklet on one line is commented out in the first line above) | |
l = document.location.href; | |
l = l.replace('https://twitter.com/', 'tweetbot://'); | |
l = l.replace('statuses', 'status'); | |
l = l.replace('http://twitter.com/', 'tweetbot://'); | |
l = l.replace('http://mobile.twitter.com/', 'tweetbot://'); | |
l = l.replace('https://mobile.twitter.com/', 'tweetbot://'); | |
window.location=l; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment