Created
July 12, 2012 00:27
-
-
Save brockboland/3094686 to your computer and use it in GitHub Desktop.
Simple "Tweet this page" bookmarklet 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: var D=550, A=450, C=screen.height, B=screen.width, H=Math.round((B/2)-(D/2)), G=0, F=document, t=encodeURIComponent(F.title), u=encodeURIComponent(F.location); if(C>A) {G=Math.round((C/2)-(A/2));} window.open('http://twitter.com/intent/tweet?text=' + t + '&url=' + u,'','left='+H+',top='+G+',width='+D+',height='+A+',personalbar=0,toolbar=0,scrollbars=1,resizable=1'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Partly based on no-longer-functional code from an old blog post: https://dev.twitter.com/docs/share-bookmarklet