diff --git a/bulkDeleteConversations.js b/bulkDeleteConversations.js index 99a885f..447e2a1 100644 --- a/bulkDeleteConversations.js +++ b/bulkDeleteConversations.js @@ -27,9 +27,22 @@ function removeAllCheckboxes() { async function deleteConversation(checkbox) { const conversationElement = checkbox.parentElement; - await delay(300); - console.log("1. Clicking conversation...", conversationElement); - conversationElement.click(); + await delay(100); + // console.log("1. Clicking conversation...", conversationElement); + // conversationElement.click(); + // 将 click 替换为悬停 + + // 创建一个鼠标悬停事件 + const hoverEvent = new MouseEvent('mouseover', { + view: window, + bubbles: true, + cancelable: true + }); + + console.log("1. Hovering over conversation...", conversationElement); + // 触发鼠标悬停事件 + conversationElement.dispatchEvent(hoverEvent); + await delay(200); const pointerDownEvent = new PointerEvent('pointerdown', { bubbles: true, diff --git a/manifest.json b/manifest.json index 6194059..9887c96 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 3, "name": "ChatGPT Bulk Delete", - "version": "4.0", + "version": "4.1", "description": "A Chrome extension to bulk delete ChatGPT conversations", "icons": { "48": "icon48.png"