Skip to content

Instantly share code, notes, and snippets.

@Pazzilivo
Created October 19, 2012 06:45
Show Gist options
  • Save Pazzilivo/3916604 to your computer and use it in GitHub Desktop.
Save Pazzilivo/3916604 to your computer and use it in GitHub Desktop.
doubanFM to twitter
javascript:(function(){var m=window.FM;var o=m.getCurrentSongInfo();var p='♫ '+o.songName+' - '+o.artistName;var D=550,A=250,C=screen.height,B=screen.width,H=Math.round((B/2)-(D/2)),G=0;if(C>A){G=Math.round((C/2)-(A/2))}window.twttr.shareWin=window.open('https://twitter.com/intent/tweet/?text='+p+'&hashtags=NowPlaying,DoubanFM&url='+encodeURIComponent(o.url),'','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