From 6c5f6d894dcf509fe4c19afe60b670afb12b1dbb Mon Sep 17 00:00:00 2001 From: Oleh Bespalov Date: Sun, 20 Apr 2025 23:17:54 +0200 Subject: [PATCH 1/3] fix for delete/archieve of custom gpt chats --- bulkArchiveConversations.js | 2 +- bulkDeleteConversations.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bulkArchiveConversations.js b/bulkArchiveConversations.js index b84fa69..edb31bd 100644 --- a/bulkArchiveConversations.js +++ b/bulkArchiveConversations.js @@ -50,7 +50,7 @@ async function archiveConversation(checkbox) { console.log("1. Hovering over conversation...", conversationElement); - const interactiveElement = conversationElement.querySelector("[draggable=\"true\"]"); + const interactiveElement = conversationElement.querySelector("[draggable]"); if (!interactiveElement) { console.log("Skipping conversation - no interactive elements found"); // Show notification to user diff --git a/bulkDeleteConversations.js b/bulkDeleteConversations.js index 22760b9..e20e97f 100644 --- a/bulkDeleteConversations.js +++ b/bulkDeleteConversations.js @@ -63,7 +63,7 @@ async function deleteConversation(checkbox) { console.log("conversationElement", conversationElement); // Look for interactive element within the conversation element - const interactiveElement = conversationElement.querySelector("[draggable=\"true\"]"); + const interactiveElement = conversationElement.querySelector("[draggable]"); if (!interactiveElement) { console.log("Skipping conversation - no interactive elements found"); // Show notification to user From c828d41c5e677a120690ee4c6ef6b6064aaccc82 Mon Sep 17 00:00:00 2001 From: Oleh Bespalov Date: Sun, 20 Apr 2025 23:19:36 +0200 Subject: [PATCH 2/3] update version --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index f8839eb..64bcae7 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 3, "name": "ChatGPT Bulk Delete", - "version": "5.9", + "version": "5.10", "description": "A Chrome extension to bulk delete ChatGPT conversations", "icons": { "48": "icon48.png" From 4db9a1a518066fac44b41bde581fe022e768e730 Mon Sep 17 00:00:00 2001 From: Oleh Bespalov Date: Sun, 20 Apr 2025 23:30:54 +0200 Subject: [PATCH 3/3] Fix: extract interactive selector to globals --- bulkArchiveConversations.js | 2 +- bulkDeleteConversations.js | 2 +- globals.js | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bulkArchiveConversations.js b/bulkArchiveConversations.js index edb31bd..b8ea28b 100644 --- a/bulkArchiveConversations.js +++ b/bulkArchiveConversations.js @@ -50,7 +50,7 @@ async function archiveConversation(checkbox) { console.log("1. Hovering over conversation...", conversationElement); - const interactiveElement = conversationElement.querySelector("[draggable]"); + const interactiveElement = conversationElement.querySelector(Selectors.INTERACTIVE_ELEMENT_SELECTOR); if (!interactiveElement) { console.log("Skipping conversation - no interactive elements found"); // Show notification to user diff --git a/bulkDeleteConversations.js b/bulkDeleteConversations.js index e20e97f..46b4757 100644 --- a/bulkDeleteConversations.js +++ b/bulkDeleteConversations.js @@ -63,7 +63,7 @@ async function deleteConversation(checkbox) { console.log("conversationElement", conversationElement); // Look for interactive element within the conversation element - const interactiveElement = conversationElement.querySelector("[draggable]"); + const interactiveElement = conversationElement.querySelector(Selectors.INTERACTIVE_ELEMENT_SELECTOR); if (!interactiveElement) { console.log("Skipping conversation - no interactive elements found"); // Show notification to user diff --git a/globals.js b/globals.js index 09e1b7f..fe21aec 100644 --- a/globals.js +++ b/globals.js @@ -12,6 +12,7 @@ if (typeof window.globalsLoaded === "undefined") { CONVERSATION_SELECTOR: 'li[data-testid^="history-item-"]', // 更新标题选择器,保持相对路径 TITLE_SELECTOR: ".relative.grow.overflow-hidden.whitespace-nowrap", + INTERACTIVE_ELEMENT_SELECTOR: '[draggable]', }; // Constants