diff --git a/contents/custom.tsx b/contents/custom.tsx index 6ba3da5..8651317 100644 --- a/contents/custom.tsx +++ b/contents/custom.tsx @@ -228,16 +228,21 @@ export default function CustomOverlay() { function handleOk() { const currentDom = document.querySelector(".codebox-current") - removeCurrentDom() + if (isDownloadType == "html") { + removeCurrentDom() downloadHtml(currentDom) } else if (isDownloadType == "downloadMarkdown") { + removeCurrentDom() downloadMarkdown(currentDom) } else if (isDownloadType == "editMarkdown") { setContent(".codebox-current") + removeCurrentDom() } else if (isDownloadType == "pdf") { + removeCurrentDom() downloadPdf(currentDom) } else if (isDownloadType == "img") { + removeCurrentDom() downloadImg(currentDom) } isReady = false diff --git a/package.json b/package.json index 10c7912..85d657e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "code-box", "displayName": "__MSG_extensionName__", - "version": "0.8.3", + "version": "0.8.4", "description": "__MSG_extensionDescription__", "author": "027xiguapi. <458813868@qq.com>", "scripts": {