truncate artist urls on display
This commit is contained in:
@@ -59,7 +59,7 @@
|
||||
$("#form").appendTo(dialog);
|
||||
dialog.dialog({
|
||||
title: "Edit tags",
|
||||
width: $(window).width() / 3,
|
||||
width: $(window).width() * 0.6,
|
||||
position: {
|
||||
my: "right",
|
||||
at: "right-20",
|
||||
|
||||
@@ -259,7 +259,11 @@
|
||||
if (text.match(/^ http/)) {
|
||||
text = text.substring(1, 1000);
|
||||
var $url = $("<a/>");
|
||||
$url.text(text);
|
||||
var desc = text.replace(/^https?:\/\//, "");
|
||||
if (desc.length > 30) {
|
||||
desc = desc.substring(0, 30) + "...";
|
||||
}
|
||||
$url.text(desc);
|
||||
$url.attr("href", text);
|
||||
$url.attr("target", "_blank");
|
||||
$ul.append($("<li/>").html($url));
|
||||
|
||||
Reference in New Issue
Block a user