Skip to content

Instantly share code, notes, and snippets.

@sillygwailo
Created February 12, 2014 19:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sillygwailo/8962916 to your computer and use it in GitHub Desktop.
Save sillygwailo/8962916 to your computer and use it in GitHub Desktop.
Open Tweets in Tweetbot
// 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