Created
April 18, 2025 12:35
-
-
Save kazu0617/ff14652baf274a39273f2c3df7e2c0a3 to your computer and use it in GitHub Desktop.
Twitter Bulk DM Deleter スパム画面を映ってる分全部消すやつ。ミスって動かすと全部消えるので気を付けてね。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.querySelectorAll('[data-testid="conversation"]').forEach((conv, i) => { | |
setTimeout(() => { | |
console.log(`[${i}] 🔍 会話クリック中…`); | |
setTimeout(() => { | |
const menuBtn = document.querySelector('[aria-label="オプションメニュー"]'); | |
if (!menuBtn) { | |
console.warn(`[${i}] ⚠️ メニューが見つからぬ…`); | |
return; | |
} | |
console.log(`[${i}] 🧭 メニューを開く…`); | |
menuBtn.click(); | |
setTimeout(() => { | |
const items = document.querySelectorAll('[role="menuitem"]'); | |
const deleteItem = Array.from(items).find(el => | |
el.textContent.includes("会話を削除する") || el.textContent.includes("会話を削除") || el.textContent.includes("Delete conversation") | |
); | |
if (!deleteItem) { | |
console.warn(`[${i}] ⚠️ 削除メニューが見つからぬ…`); | |
return; | |
} | |
console.log(`[${i}] ✅ 削除を確定する…`); | |
deleteItem.click(); | |
console.log(`[${i}] 🎉 削除完了!`); | |
}, 300); | |
}, 300); | |
}, i * 500); // ゆっくりめに動かして、失敗しにくく | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment