Skip to content

Instantly share code, notes, and snippets.

@rwc9u
Created January 14, 2010 07:38
Show Gist options
  • Save rwc9u/276976 to your computer and use it in GitHub Desktop.
Save rwc9u/276976 to your computer and use it in GitHub Desktop.
javascript:(
function(){var s=document.createElement("script");
s.charset="UTF-8";
s.type="text/javascript";
s.src="http://shortswitch.com/admin/marklet/tweetie/APIKEY";
document.body.appendChild(s);})();
function openTweetie(cb) {
window.location='tweetie:'+document.title+':%20'+ cb["results"][decodeURI(window.location)]["shortUrl"];
};
var s=document.createElement("script");
s.charset="UTF-8";
s.type = "text/javascript";
s.src="http://api.shortswitch.com/shorten?longUrl="+window.location+"&apiKey=APIKEY&format=json&callback=openTweetie";
document.body.appendChild(s);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment