last.fm - radio lyrics

By reeloo Last update Aug 4, 2009 — Installed 2,082 times.

Archived Comments (locked)

in
Subscribe to Archived Comments 5 posts, 5 voices



Jesse Andrews Admin

The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008)

 
lctm Scriptwright

This script is awesome! that's exactly what I was looking for.
And I got some inspiration as to how to get information about the song in the script... using the document.title =)

 
katasta User

thank you so much for this great script. i've been looking for something like this for ages!

i made some slight adjustments though. first, i wanted to have the lyrics in the right column, so my line 17 now reads:

if (div_wrapper[i].className=="rightCol"){

next i put an edit button in. i simply copied the code from the last.fm - lyrics gm script, so line 43 to 51 are now like this:

var lyrics = responseDoc.getElementsByTagName("lyrics")[0].childNodes[0].nodeValue; 
var sourceURL = responseDoc.getElementsByTagName("url")[0].childNodes[0].nodeValue;
lyrics_text=document.getElementById("lyrics_text");
lyrics_text.innerHTML=lyrics.replace(/\n/g, "<br />")
            + '<br/><span class="moduleOptions">'
            + '<a href="' + sourceURL + '" class="icon">'
            + '<img width="19" height="19" '
            + 'src="http://cdn.last.fm/flatness/icons/pencil.gif" '
            + 'class="edit_icon transparent_png" /><span>Edit</span></a></span>';

i also changed the look (which needs to be updated anyway since last.fm made some design changes again), so my lyrics wrapper is like this:

lyrics_wrapper='<div id="lyrics_wrapper">'+
    '<h2 class="heading">'+
    '<span class="h2Wrapper">Lyrics</span>'+
    '</h2>'+
    '<div id="lyrics_text" class="stats"></div>'+
    '</div>';

 
alala Scriptwright

great script. can I persuade you to join the Greasemonkey group on last.fm where we try to consolidate all last.fm related scripts and keep everyone informed of updates.

http://www.last.fm/group/Greasemonkeys

 
reeloo Script's Author
Additional info at http://www.reeloo.net/wordpress/lyrics-for-lastfm-radio
Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel