diff --git a/src/chrome/content/scrapbook-sidebar.js b/src/chrome/content/scrapbook-sidebar.js index f82b810..99079af 100644 --- a/src/chrome/content/scrapbook-sidebar.js +++ b/src/chrome/content/scrapbook-sidebar.js @@ -14,12 +14,15 @@ var ExportToWiz = { return; var id = ScrapBookData.getProperty(aRes, "id"), + type = ScrapBookData.getProperty(aRes, "type"), title = ScrapBookData.getProperty(aRes, "title"), url = ScrapBookData.getProperty(aRes, "source"); + // 当 type 为 site 时,有多个 html,会有问题 + var aFolder = ScrapBookUtils.getContentDir(id), indexPath = aFolder.path + '\\index.html', - preUrl = url.replace(/[^\/]+\/?$/, ''); + preUrl = url.replace(/[^\/]*$/, ''); var contentConfig = "[Common]\r\nURL=" + url + "\r\nTitle=" + title + @@ -45,6 +48,7 @@ var ExportToWiz = { contentConfig += "\r\nCount=" + resourceFilesIndex; // console.log(contentConfig); + console.log('111', type) this.launchWiz(contentConfig); }, diff --git a/src/install.rdf b/src/install.rdf index 1ef048f..7e4d84b 100644 --- a/src/install.rdf +++ b/src/install.rdf @@ -4,7 +4,7 @@ 2 exportscrapbooktowiz@ywzhaiqi - 1.1 + 1.2 ExportScrapbookToWiz 导出 Scrapbook 条目到 Wiz ywzhaiqi