Empty commit

This commit is contained in:
Git 2013-04-10 08:00:43 +00:00
parent b009e2c889
commit 6790608346

View File

@ -153,18 +153,23 @@
tasteometerHtml += '<li class="lastfm_essential">Compatibility: ';
var compatibility = Math.round(j['score'] * 100);
var background;
if (compatibility < 50){
background = 'rgb(255, '+Math.floor(255*compatibility/50)+', 0)'
} else {
background = 'rgb('+Math.floor((1-(compatibility-50)/50)*255)+', 255, 0)'
}
tasteometerHtml += compatibility + '%\r\
if (compatibility < 0 || compatibility > 100) {
compatibility = "Unknown";
tasteometerHtml += compatibility;
} else {
if (compatibility < 50){
background = 'rgb(255, '+Math.floor(255*compatibility/50)+', 0)'
} else {
background = 'rgb('+Math.floor((1-(compatibility-50)/50)*255)+', 255, 0)'
}
tasteometerHtml += compatibility + '%\r\
<li class="lastfm_essential">\r\
<div id="lastfm_compatibilitybar_container">\n\
<div id="lastfm_compatibilitybar" style="width: '+compatibility+'%; background: '+background+';">\n\
</div>\r\
</div>\r\
</li>';
}
// Only print shared artists if there are any
if (j['artists']['matches'] != 0){
sharedArtistsHtml += '<li>Shared artists:</li><li><ul class="nobullet">';