diff options
author | Brion Vibber <brion@pobox.com> | 2010-11-16 13:58:22 -0800 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-11-16 13:58:22 -0800 |
commit | f103a550521bffd9662dff473119389b10696582 (patch) | |
tree | d0c587b0c4f63eb6abcfed0dd4f8b2a8f89228e6 /plugins | |
parent | 5166e71d24d1121f7d99bc788fe734d5c6e86e79 (diff) |
LinkPreview: link the thumbnails
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/LinkPreview/linkpreview.js | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/plugins/LinkPreview/linkpreview.js b/plugins/LinkPreview/linkpreview.js index eae6dfd43..9f0ed6562 100644 --- a/plugins/LinkPreview/linkpreview.js +++ b/plugins/LinkPreview/linkpreview.js @@ -73,11 +73,14 @@ $(function() { } } if (thumb) { - var img = $('<img/>') - .attr('src', thumb) - .attr('width', width) - .attr('title', data.title || data.url || url); - $('#' + id).append(img); + var link = $('<a><img/></a>'); + 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); } }); } |