LinkPreview: link the thumbnails

This commit is contained in:
Brion Vibber 2010-11-16 13:58:22 -08:00
parent 5166e71d24
commit f103a55052

View File

@ -73,11 +73,14 @@ $(function() {
} }
} }
if (thumb) { if (thumb) {
var img = $('<img/>') var link = $('<a><img/></a>');
.attr('src', thumb) link.attr('href', url)
.attr('width', width) .attr('target', '_blank')
.attr('title', data.title || data.url || url); .find('img')
$('#' + id).append(img); .attr('src', thumb)
.attr('width', width)
.attr('title', data.title || data.url || url);
$('#' + id).append(link);
} }
}); });
} }