刪除“回復我的”消息通知
function simulateDeleteAndConfirm() {
? const deleteButton = document.querySelector(".action-icon");
? const confirmButton = document.querySelector(".bl-button--primary .txt");
? if (deleteButton && confirmButton) {
? ? const clickEvent = new MouseEvent("click", {
? ? ? bubbles: true,
? ? ? cancelable: true,
? ? ? view: window
? ? });
? ? deleteButton.parentElement.dispatchEvent(clickEvent);
? ?
? ? setTimeout(() => {
? ? ? confirmButton.click();
? ? ? setTimeout(simulateDeleteAndConfirm, 1000);
? ? }, 1000);
? }
}
simulateDeleteAndConfirm();
標簽: