From 6e38ae94f2dd069b7c447d484980b3d642db59b1 Mon Sep 17 00:00:00 2001 From: qcrao Date: Wed, 13 Nov 2024 14:56:56 +0800 Subject: [PATCH] update conversation selector --- globals.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/globals.js b/globals.js index d3cbe0d..09e1b7f 100644 --- a/globals.js +++ b/globals.js @@ -3,14 +3,18 @@ if (typeof window.globalsLoaded === "undefined") { window.globalsLoaded = true; -const Selectors = { - conversationsCheckbox: ".conversation-checkbox:checked", - confirmDeleteButton: "button.btn.btn-danger", - threeDotButton: '[id^="radix-"]', - CONVERSATION_SELECTOR: "div.relative > ol > li > div > a", - TITLE_SELECTOR: ".relative.grow.overflow-hidden.whitespace-nowrap", -}; + const Selectors = { + // 更新对话选择器以匹配新的 data-testid 属性 + conversationsCheckbox: ".conversation-checkbox:checked", + confirmDeleteButton: "button.btn.btn-danger", + threeDotButton: '[id^="radix-"]', + // 更新为新的对话选择器格式 + CONVERSATION_SELECTOR: 'li[data-testid^="history-item-"]', + // 更新标题选择器,保持相对路径 + TITLE_SELECTOR: ".relative.grow.overflow-hidden.whitespace-nowrap", + }; + // Constants const CHECKBOX_CLASS = "conversation-checkbox"; // Expose variables to the global scope