opt can not found delete confirm button
This commit is contained in:
@@ -36,7 +36,9 @@ async function deleteConversation(checkbox) {
|
|||||||
const deleteButton = await waitForElement("nav div a>div>button:nth-child(2)");
|
const deleteButton = await waitForElement("nav div a>div>button:nth-child(2)");
|
||||||
|
|
||||||
if (deleteButton) {
|
if (deleteButton) {
|
||||||
|
await delay(100);
|
||||||
console.log("2. 点击删除按钮");
|
console.log("2. 点击删除按钮");
|
||||||
|
|
||||||
deleteButton.click(); // 点击删除按钮
|
deleteButton.click(); // 点击删除按钮
|
||||||
|
|
||||||
// 等待确认删除对话框的按钮出现
|
// 等待确认删除对话框的按钮出现
|
||||||
@@ -62,6 +64,7 @@ async function waitForElement(selector, timeout = 5000) {
|
|||||||
if (element) return element;
|
if (element) return element;
|
||||||
await delay(100);
|
await delay(100);
|
||||||
}
|
}
|
||||||
|
console.log('do not found delete confirm button')
|
||||||
throw new Error(`Element ${selector} not found within ${timeout}ms`);
|
throw new Error(`Element ${selector} not found within ${timeout}ms`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"manifest_version": 3,
|
"manifest_version": 3,
|
||||||
"name": "ChatGPT Bulk Delete",
|
"name": "ChatGPT Bulk Delete",
|
||||||
"version": "2.6",
|
"version": "2.7",
|
||||||
"description": "A Chrome extension to bulk delete ChatGPT conversations",
|
"description": "A Chrome extension to bulk delete ChatGPT conversations",
|
||||||
"icons": {
|
"icons": {
|
||||||
"48": "icon48.png"
|
"48": "icon48.png"
|
||||||
|
|||||||
Reference in New Issue
Block a user