From 70a52e2eaed25686160f0d1be1682f85230d9408 Mon Sep 17 00:00:00 2001 From: Wu Cheng-Han Date: Mon, 17 Oct 2016 18:03:26 +0800 Subject: [PATCH] Remove auto linkify image since it might print out unwanted url and it can be achieved by reference syntax, issue #214 --- public/js/extra.js | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/public/js/extra.js b/public/js/extra.js index fd22fc8..ad1e19b 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 = $(''); - 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");