diff --git a/package.json b/package.json index e57264e..7c12968 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "yuque-helper", - "version": "1.0.0", + "version": "1.1.0", "description": "一个语雀辅助小工具", "author": "kiwiflydream@gmail.com", "license": "MIT", diff --git a/src/manifest.json b/src/manifest.json index 1fdb7f3..e86f951 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -1,7 +1,7 @@ { "name": "yuque-helper", "description": "一个语雀辅助小工具", - "version": null, + "version": "1.1.0", "manifest_version": 2, "icons": { "48": "icons/icon_48.png", @@ -17,6 +17,7 @@ "storage", "notifications" ], + "homepage_url": "https://blog.coder4j.cn", "background": { "scripts": [ "background.js" diff --git a/src/markmap/markmap.html b/src/markmap/markmap.html index c999b39..bb23464 100644 --- a/src/markmap/markmap.html +++ b/src/markmap/markmap.html @@ -3,12 +3,11 @@ - New Tab Page + yuque-helper - markmap -
@@ -26,6 +25,6 @@ diff --git a/src/options/App.vue b/src/options/App.vue index f6d8ff0..5db1f31 100644 --- a/src/options/App.vue +++ b/src/options/App.vue @@ -28,18 +28,18 @@ - - - - + + - - + + + + diff --git a/src/options/options.html b/src/options/options.html index 23ce74c..20eb3e0 100644 --- a/src/options/options.html +++ b/src/options/options.html @@ -2,7 +2,7 @@ - yuque-helper - Options + yuque-helper - 设置 <% if (NODE_ENV === 'development') { %> diff --git a/src/popup/App.vue b/src/popup/App.vue index c316dc1..678c01a 100644 --- a/src/popup/App.vue +++ b/src/popup/App.vue @@ -105,11 +105,18 @@ export default { }, // 打开 markmap 目录 openMarkmap() { - this.sendMessageToContentScript({ cmd: 'get_markmap' }, function (response) { - console.log(response); - chrome.storage.local.set({ temp: response }, () => { - window.open('/markmap/markmap.html', '_blank'); - }); + this.getCurrentTab((tab) => { + if (!tab.url.includes('markdown')) { + // 通知 + this.notify('生成失败', '请在 markdown 视图下打开'); + } else { + this.sendMessageToContentScript({ cmd: 'get_markmap' }, function (response) { + console.log(response); + chrome.storage.local.set({ temp: response }, () => { + window.open('/markmap/markmap.html', '_blank'); + }); + }); + } }); }, // 打开设置