Commit 7ef59794 authored by Jonas Haraldsson's avatar Jonas Haraldsson

stop printing tags if tags_length > max_length

parent 97f02612
......@@ -310,9 +310,17 @@ function getTopTrackTags() {
$('#tracktags ul').append('<li class="tunebutton">' + tagname + '</li>');
}else{
var i;
var max_length = 50;
var tags_length = 0;
for(i in tag_items) {
var tagname = tag_items[i].name;
$('#tracktags ul').append('<li class="tunebutton">' + tagname + '</li>');
tags_length = tags_length + tagname.length + 1;
//limit total length for tags
if (tags_length <= max_length) {
$('#tracktags ul').append('<li class="tunebutton">' + tagname + '</li>');
}else{
break;
}
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment