Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Web版Google Play MusicでもいつものフォーマットでNowPlayingするブックマークレット
javascript:
var te=document.getElementById("player-song-title");
var t=te.innerHTML;
t=t.replace(/& /g,"&");
var ae=document.getElementById("player-artist");
var a=ae.innerHTML;
a=a.replace(/& /g,"&");
var ale=document.getElementsByClassName("player-album");
var al=ale[0].innerHTML;
al=al.replace(/& /g,"&");
var tweet=encodeURIComponent('『'+t+'』'+'by《'+a+'》'+'from【'+al+'】'+' #webPlay'+' #nowplaying');
void(window.open('https://twitter.com/intent/tweet?text='+tweet));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment