From 2a598ec8e62cb43bdd92d01511b8acb005a55eed Mon Sep 17 00:00:00 2001 From: qcrao Date: Mon, 9 Oct 2023 14:48:20 +0800 Subject: [PATCH] opt can not found delete confirm button --- bulkDeleteConversations.js | 3 +++ manifest.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/bulkDeleteConversations.js b/bulkDeleteConversations.js index be84a14..043706e 100644 --- a/bulkDeleteConversations.js +++ b/bulkDeleteConversations.js @@ -36,7 +36,9 @@ async function deleteConversation(checkbox) { const deleteButton = await waitForElement("nav div a>div>button:nth-child(2)"); if (deleteButton) { + await delay(100); console.log("2. 点击删除按钮"); + deleteButton.click(); // 点击删除按钮 // 等待确认删除对话框的按钮出现 @@ -62,6 +64,7 @@ async function waitForElement(selector, timeout = 5000) { if (element) return element; await delay(100); } + console.log('do not found delete confirm button') throw new Error(`Element ${selector} not found within ${timeout}ms`); } diff --git a/manifest.json b/manifest.json index 2321e62..30c260b 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 3, "name": "ChatGPT Bulk Delete", - "version": "2.6", + "version": "2.7", "description": "A Chrome extension to bulk delete ChatGPT conversations", "icons": { "48": "icon48.png"