fixes #2631 artist urls in related tags should have option to open in new window

This commit is contained in:
r888888888
2016-07-25 14:25:09 -07:00
parent 4cd6dfe884
commit c0beca8e90

View File

@@ -222,7 +222,21 @@
$("<li/>").append($link)
);
} else {
$ul.append($("<li/>").text(tag[0]));
var text = tag[0];
if (text.match(/^ http/)) {
text = text.substring(1, 1000);
var $url = $("<a/>");
$url.text("open");
$url.attr("href", text);
$url.attr("target", "_blank");
var $li = $("<li/>");
$li.append(text + " [");
$li.append($url);
$li.append("]");
$ul.append($li);
} else {
$ul.append($("<li/>").text(text));
}
}
});