summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--public/js/extra.js12
1 files changed, 1 insertions, 11 deletions
diff --git a/public/js/extra.js b/public/js/extra.js
index fd22fc80..ad1e19b5 100644
--- a/public/js/extra.js
+++ b/public/js/extra.js
@@ -352,19 +352,9 @@ function finishView(view) {
images.each(function (key, value) {
// if it's already wrapped by link, then ignore
var $value = $(value);
- if ($value.parent()[0].nodeName === 'A') return;
- var src = $(value).attr('src');
- var a = $('<a>');
- if (src) {
- a.attr('href', src);
- a.attr('target', "_blank");
- }
- var clone = $value.clone();
- clone[0].onload = function (e) {
+ $value[0].onload = function (e) {
if(viewAjaxCallback) viewAjaxCallback();
};
- a.html(clone);
- $value.replaceWith(a);
});
//blockquote
var blockquote = view.find("blockquote.raw").removeClass("raw");