diff --git a/css/style.css b/css/style.css
index 21a2040..2a15bb5 100644
--- a/css/style.css
+++ b/css/style.css
@@ -123,7 +123,7 @@ div.timeline {
div#progressbar { width: 0; height: 20px; background-color: #FA5945; }
div#preloadbar { width: 0; height: 20px; background-color: rgba(255,228,0,0.5); }
-div.meta { background-color: rgba(0, 0, 0, 0.1); width:460px; padding:20px; font-size:12px; display:inline-block; }
+div.meta { background-color: rgba(0, 0, 0, 0.1); width:460px; padding:20px; font-size:16px; display:inline-block; }
#footer {
diff --git a/mhd.js b/mhd.js
index 8ccd394..2e15287 100644
--- a/mhd.js
+++ b/mhd.js
@@ -98,12 +98,23 @@ function usePlayer (player) {
var artist_id = doc.find('artist').attr('id');
console.log("musicbrainz artist id = " + artist_id);
+ var icons = {
+ facebook: 'http://facebook.com/favicon.ico',
+ lastfm: 'http://last.fm/favicon.ico',
+ myspace: 'http://myspace.com/favicon.ico',
+ twitter: 'http://twitter.com/favicon.ico',
+ youtube: 'http://www.youtube.com/favicon.ico',
+ };
+
$.ajax({
type: "GET",
url: "http://jsmad.org/musicmetric/musicbrainz:" + artist_id,
dataType: "json",
success: function(json) {
console.log("success? " + json.success);
+ var up_img = '';
+ var down_img = '
';
+ var equal_img = '
';
for(var platform in json.response.fans) {
if(!json.response.fans.hasOwnProperty(platform)) continue;
@@ -114,7 +125,7 @@ function usePlayer (player) {
var currentFans = parseInt(fans.current);
var totalFans = parseInt(fans.total);
console.log("previous/current fans? " + previousFans + "/" + currentFans);
- $('#meta_info').append('
' + platform + ': ' + totalFans + ' fans, ' + (Math.abs(currentFans - previousFans) < 100 ? 'holding up' : (currentFans > previousFans ? 'on the rise' : 'falling down')) + '
'); + $('#meta_info').append('' + (Math.abs(currentFans - previousFans) < 5 ? equal_img : (currentFans > previousFans ? up_img : down_img)) + ' ' + platform + ': ' + (totalFans > 1000000 ? ((Math.floor(totalFans / 100000) / 10.0) + "M") : (totalFans > 1000 ? ((Math.floor(totalFans / 100) / 10.0) + "K") : totalFans)) + ' fans' + '