Google Music Lyrics

This bookmarklet adds support for lyrics in Google Music.

When you play a song and like to sing along, this can help fetching corresponding lyrics from LyricWikia and display on the screen. It is just a harmless bookmarklet which requires you to install nothing (see source code). All you need to do is dragging the link below to your browser bookmark bar.

The bookmarklet must be used in the Google Music tab and a song is being played. Clicking on it the first time will show a panel with lyrics of the current song. Clicking while the song is still playing will hide the lyrics panel. When a new song is played, click again to load new lyrics.

If a song’s lyrics is unavailable, you will be prompted to search and create new entry on LyricWikia. The new lyrics will be available soon after being published.

If there is any issue, please leave a comment at the bottom of the page.

Verbose version:

javascript:(function(){
    var artist = document.getElementById('player-artist') || false;
    artist = artist ? artist.innerText + ':' : '';
    var url = 'https://lyrics-coolersport.rhcloud.com/index.php/'+encodeURI(artist+document.getElementById('currently-playing-title').innerText);
    var frame = document.getElementById('lyricsframe');
    if (frame || false) {
        var removing = frame.src == url;
        frame.parentNode.parentNode.removeChild(frame.parentNode);
        if (removing) return false;
    }
    var div = document.createElement('div');
    document.getElementsByTagName('body')[0].appendChild(div);
    div.style.position = 'fixed';
    div.style.top=0;
    div.style.left=0;
    div.style.right=0;
    div.style.bottom=0;
    div.style.zIndex=999999;
    div.style.pointerEvents='none';
    frame = document.createElement('iframe');
    div.appendChild(frame);
    frame.id = 'lyricsframe';
    frame.style.border = '2px groove #fff';
    frame.style.width='50%';
    frame.style.height='70%';
    frame.style.margin='5% auto';
    frame.style.display='block';
    frame.style.pointerEvents='all';
    frame.src = url;
    return false;
})();

Published: February 28 2015

blog comments powered by Disqus