From 9b9406a22d2c5e34b7a989139aae911e228ed6a4 Mon Sep 17 00:00:00 2001 From: qcrao Date: Thu, 19 Oct 2023 20:17:57 +0800 Subject: [PATCH] fix redefied bug --- bulkDeleteConversations.js | 6 ------ globals.js | 8 ++++++++ manifest.json | 1 + 3 files changed, 9 insertions(+), 6 deletions(-) create mode 100644 globals.js diff --git a/bulkDeleteConversations.js b/bulkDeleteConversations.js index 0a8801c..d1e2251 100644 --- a/bulkDeleteConversations.js +++ b/bulkDeleteConversations.js @@ -1,9 +1,3 @@ -const Selectors = { - conversationsCheckbox: '.conversation-checkbox:checked', - deleteButton: 'nav div a>div>button:nth-child(2)', - confirmDeleteButton: 'button.btn.btn-danger', -}; - async function bulkDeleteConversations() { const selectedConversations = getSelectedConversations(); diff --git a/globals.js b/globals.js new file mode 100644 index 0000000..130f70d --- /dev/null +++ b/globals.js @@ -0,0 +1,8 @@ +let lastChecked = null; + +const Selectors = { + conversationsCheckbox: '.conversation-checkbox:checked', + deleteButton: 'nav div a>div>button:nth-child(2)', + confirmDeleteButton: 'button.btn.btn-danger', +}; + \ No newline at end of file diff --git a/manifest.json b/manifest.json index c62ac60..22cbc4c 100644 --- a/manifest.json +++ b/manifest.json @@ -21,6 +21,7 @@ "*://chat.openai.com/*" ], "js": [ + "globals.js", "addCheckboxes.js", "bulkDeleteConversations.js" ]