summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-11-16 13:58:22 -0800
committerBrion Vibber <brion@pobox.com>2010-11-16 13:58:22 -0800
commitf103a550521bffd9662dff473119389b10696582 (patch)
treed0c587b0c4f63eb6abcfed0dd4f8b2a8f89228e6 /plugins
parent5166e71d24d1121f7d99bc788fe734d5c6e86e79 (diff)
LinkPreview: link the thumbnails
Diffstat (limited to 'plugins')
-rw-r--r--plugins/LinkPreview/linkpreview.js13
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);
}
});
}