fix: export btn (#541)

This commit is contained in:
lencx
2023-03-03 23:19:51 +08:00
parent 5e5d6d268e
commit 56c0b8616d

View File

@@ -38,12 +38,7 @@ const Format = {
}; };
function shouldRemoveButtons() { function shouldRemoveButtons() {
const isOpenScreen = document.querySelector("h1.text-4xl"); if (document.querySelector("form .text-2xl")) {
if(isOpenScreen){
return true;
}
const inConversation = document.querySelector("form button>div");
if(inConversation){
return true; return true;
} }
return false; return false;
@@ -144,7 +139,7 @@ async function exportMarkdown() {
j.innerHTML = `<blockquote>${i.innerHTML}</blockquote>`; j.innerHTML = `<blockquote>${i.innerHTML}</blockquote>`;
} }
return j.innerHTML; return j.innerHTML;
}).join('<hr />'); }).join('');
const data = ExportMD.turndown(content); const data = ExportMD.turndown(content);
const { id, filename } = getName(); const { id, filename } = getName();
await invoke('save_file', { name: `notes/${id}.md`, content: data }); await invoke('save_file', { name: `notes/${id}.md`, content: data });