From 7fe82b30d854b2eefabdc3d5894c5712ffef877f Mon Sep 17 00:00:00 2001 From: Alexis Degrugillier Date: Sat, 23 Jun 2018 10:34:56 +0200 Subject: [PATCH] Add dokuwiki syntax support See #16 --- background.js | 7 +++++++ manifest.json | 2 +- options/options.html | 5 +++-- package-lock.json | 2 +- package.json | 2 +- popup/load.content.html | 7 +++++-- 6 files changed, 18 insertions(+), 7 deletions(-) diff --git a/background.js b/background.js index b4a26b5..476e294 100644 --- a/background.js +++ b/background.js @@ -3,6 +3,7 @@ const bookmarkAddId = 'bookmark-add'; const textReducer = (carry, item) => `${carry + item.url}\n`; const markdownReducer = (carry, item) => `${carry}[${item.title}](${item.url})\n`; const htmlReducer = (carry, item) => `${carry}${item.title}
\n`; +const dokuwikiReducer = (carry, item) => `${carry}[[${item.url}|${item.title}]]\n`; let downloadId = 0; function notification(message) { @@ -53,6 +54,12 @@ function getDownloadOptions(format) { filename: 'linkdump.html', type: 'text/html' }; + case 'dokuwiki': + return { + reducer: dokuwikiReducer, + filename: 'linkdump.dk', + type: 'text/plain' + }; default: return { reducer: textReducer, diff --git a/manifest.json b/manifest.json index 4cc679b..d238687 100644 --- a/manifest.json +++ b/manifest.json @@ -7,7 +7,7 @@ "manifest_version": 2, "name": "LinkDump", - "version": "1.5", + "version": "1.6", "description": "__MSG_extensionDescription__", "icons": { "48": "icons/linkdump-48.png" diff --git a/options/options.html b/options/options.html index 5e58cf7..ed15fd5 100644 --- a/options/options.html +++ b/options/options.html @@ -9,9 +9,10 @@
- - + + +
diff --git a/package-lock.json b/package-lock.json index f0ca00b..e4b9edc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "linkdump", - "version": "1.0.0", + "version": "1.6.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 6fbf85b..a826260 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "linkdump", - "version": "1.5.0", + "version": "1.6.0", "description": "Store links and dump them", "main": "background.js", "scripts": { diff --git a/popup/load.content.html b/popup/load.content.html index 98518a7..292ca1b 100644 --- a/popup/load.content.html +++ b/popup/load.content.html @@ -15,14 +15,17 @@
+