From: Brion Vibber Date: Tue, 16 Nov 2010 21:58:22 +0000 (-0800) Subject: LinkPreview: link the thumbnails X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f103a550521bffd9662dff473119389b10696582;p=quix0rs-gnu-social.git LinkPreview: link the thumbnails --- diff --git a/plugins/LinkPreview/linkpreview.js b/plugins/LinkPreview/linkpreview.js index eae6dfd43f..9f0ed65623 100644 --- a/plugins/LinkPreview/linkpreview.js +++ b/plugins/LinkPreview/linkpreview.js @@ -73,11 +73,14 @@ $(function() { } } if (thumb) { - var img = $('') - .attr('src', thumb) - .attr('width', width) - .attr('title', data.title || data.url || url); - $('#' + id).append(img); + var link = $(''); + link.attr('href', url) + .attr('target', '_blank') + .find('img') + .attr('src', thumb) + .attr('width', width) + .attr('title', data.title || data.url || url); + $('#' + id).append(link); } }); }