add empty mod slots - server no longer returns all 4, and it looks odd with empty space

This commit is contained in:
Jon Atkins 2014-05-24 04:30:00 +01:00
parent 4b40c9344c
commit 20ed666552

View File

@ -138,7 +138,10 @@ window.getModDetails = function(d) {
for (var i=0; i<mods.length; i++) {
t += '<span'+(modsTitle[i].length ? ' title="'+modsTitle[i]+'"' : '')+' style="color:'+modsColor[i]+'">'+mods[i]+'</span>'
}
// and add blank entries if we have less than 4 mods (as the server no longer returns all mod slots, but just the filled ones)
for (var i=mods.length; i<4; i++) {
t += '<span style="color:#000"></span>'
}
return t;
}