fix: export icons

This commit is contained in:
lencx 2023-07-08 11:05:53 +08:00
parent af77ee74b5
commit 7023b04dd2
2 changed files with 10 additions and 5 deletions

13
scripts/export.js vendored
View File

@ -1,6 +1,6 @@
/**
* @name export.js
* @version 0.1.2
* @version 0.1.3
* @url https://github.com/lencx/ChatGPT/tree/main/scripts/export.js
*/
@ -15,12 +15,17 @@ async function exportInit() {
const chatConf = (await invoke('get_app_conf')) || {};
window.buttonsInterval = setInterval(() => {
const actionsArea = document.querySelector('form>div>div>div');
const hasBtn = document.querySelector('form>div>div>div button');
if (!actionsArea || !hasBtn) {
const formArea = document.querySelector('form>div>div');
const textarea = formArea.querySelector('div textarea');
const textareaDiv = formArea.querySelector('div div.absolute');
const hasBtn = formArea.querySelector('div button');
if (!formArea || (textarea && textareaDiv) || !hasBtn) {
return;
}
const actionsArea = document.querySelector('form>div>div>div');
if (shouldAddButtons(actionsArea)) {
let TryAgainButton = actionsArea.querySelector('button');
if (!TryAgainButton) {

View File

@ -22,7 +22,7 @@
},
{
"name": "export.js",
"version": "0.1.2"
"version": "0.1.3"
},
{
"name": "markdown.export.js",