From f103a550521bffd9662dff473119389b10696582 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 16 Nov 2010 13:58:22 -0800 Subject: [PATCH] LinkPreview: link the thumbnails --- plugins/LinkPreview/linkpreview.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) 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); } }); } -- 2.39.5