LOADING...

Preview

Pen ID
Unlock Campus Themeforest adv

 

Code

XanderStrike is currently listening to .

CSS
@font-face {
  font-family: 'Source Sans Pro';
  font-style: normal;
  font-weight: 500;
  src: local('Source Sans Pro ExtraLight'), local('SourceSansPro-ExtraLight'), url(http://themes.googleusercontent.com/static/fonts/sourcesanspro/v5/toadOcfmlt9b38dHJxOBGLhZfOo4eSOlrve6pGrXHAo.woff) format('woff');
}

body {
  padding:100px;
} p {
  font-family: 'Source Sans Pro', sans-serif;
  font-size:30px;
  text-align:center;
}
JS
// If you use this, be sure to get your own API key!
//  -> http://www.last.fm/api/account/create

$.getJSON('http://ws.audioscrobbler.com/2.0/?method=user.getrecenttracks&user=xanderstrike&api_key=a0cdf76d44c313ba809c1f1afb312240&format=json', function(data) {
  var track = data.recenttracks.track[0]
  $('#lastfm').html(track.artist["#text"] + " - " + track.name)
});
Host Instantly Drag and Drop Website Builder

 

Description

Simple jQuery/getJSON request against the Last.fm API to get a specific users last listened track.
Term
Mon, 11/27/2017 - 21:35

Related Codes

Pen ID
Pen ID
Pen ID