mirror of
https://github.com/FranP-code/ChatGPT.git
synced 2025-10-13 00:13:25 +00:00
fix: export btn (#541)
This commit is contained in:
9
src-tauri/src/scripts/export.js
vendored
9
src-tauri/src/scripts/export.js
vendored
@@ -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 });
|
||||||
|
|||||||
Reference in New Issue
Block a user