From 7ce5c90de80902bebb8c1e91fe6c6d4980d53f29 Mon Sep 17 00:00:00 2001 From: life Date: Mon, 26 Oct 2015 19:27:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8D=E8=A6=81=E9=87=8D=E5=A4=8D=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E7=9B=B8=E5=90=8C=E7=9A=84resource?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/plugins/export_evernote/plugin.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/public/plugins/export_evernote/plugin.js b/public/plugins/export_evernote/plugin.js index 630e9c2d..c7c81acf 100644 --- a/public/plugins/export_evernote/plugin.js +++ b/public/plugins/export_evernote/plugin.js @@ -265,7 +265,7 @@ define(function() { var allMatchs = allImages.concat(allAttachs); - console.log(allMatchs); + // console.log(allMatchs); if (allMatchs.length == 0) { callback(content, ''); @@ -276,6 +276,7 @@ define(function() { var fileIdFixed = {}; var fileInfos = {}; // fileId => + var fileRendered = {}; function replaceContent () { for (var i = 0; i < allMatchs.length; ++i) { @@ -298,7 +299,7 @@ define(function() { } } else { - media += ' height="43" style="cursor:pointer;"'; + media += ' height="43"'; // style="cursor:pointer;"'; } media += ' type="' + fileInfo.type + '"'; @@ -307,7 +308,11 @@ define(function() { media += ' />'; content = content.replace(eachMatch.all, media); - resources += me.renderResource(fileInfo); + if (!fileRendered[fileInfo.fileId]) { + resources += me.renderResource(fileInfo); + fileRendered[fileInfo.fileId] = true; + } + } }