Created
September 14, 2010 00:48
-
-
Save jnrbsn/578341 to your computer and use it in GitHub Desktop.
Bit.ly + Twitter bookmarklet using pure JavaScript
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:(function(){var%20s=document.createElement('script'),l=location.href;s.type='text/javascript';s.src='http://bit.ly/javascript-api.js?version=latest&login=bitlyapidemo&apiKey=R_0da49e0a9118ff35f52f629d2d71bf07';s.onload=function(){BitlyCB.f=function(d){location.href='http://twitter.com/home?status='+encodeURIComponent(document.title+'%20'+d.results[l]['shortUrl'])};BitlyClient.shorten(l,'BitlyCB.f')};document.body.appendChild(s)})() |
csu
commented
Oct 24, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment