Open the panel to show the archived items and run the block of codes below on the console.
const delay = async (ms) => new Promise((res, rej) => setTimeout(() => res(), ms));
const lists = document.querySelectorAll('.js-delete');
for (const listDeleteBtn of lists) {
console.log(listDeleteBtn);
listDeleteBtn.click();
await delay(1000);
document.querySelector('.js-confirm').click();
}
const delay = async (ms) => new Promise((res, rej) => setTimeout(() => res(), ms));
var xpath = "//button[text()='Delete']";
var results = document.evaluate(
xpath,
document,
null,
XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,
null
);
// results.snapshotLength gives the number of matched elements
for (var i = 0; i < results.snapshotLength; i++) {
var button = results.snapshotItem(i);
console.log("Found a delete button:", button);
// You can now manipulate or use the button element as needed
button.click();
await delay(1000);
document.querySelector('button[aria-label="delete-confirm"]').click();
//break;
}