widget for websites

Note: This is an archived post. Information may not be relevant now.

This widget shows last played tracks from for a user. It also shows ‘Now Playing’ track if available.



Insert: <table id="last_fm_tracks"></table> where you want the script to write the track lists.


<script type="text/javascript" src="last_widget.js"></script>  
<script type="text/javascript">  

just before the end of the body tag </body> Don’t forget to replace xtranophilist with your username. If you are using ID for the <table> other than last_fm_tracks, make sure you pass the ID string as the second parameter for the loadLastFMTracks() method.

To Dos: -

  • Use <div>instead of <table>
  • Better styling
  • Find a way to get the feed direct from (w/o using Yahoo Pipe as Proxy for JSON

Fork this from Github :