Skip to content

Instantly share code, notes, and snippets.

View gsusI's full-sized avatar
💭
🛫

Jesus Iniesta gsusI

💭
🛫
View GitHub Profile
function expandAllThreads() {
console.log("Expanding threads...");
const expandButtons = document.querySelectorAll('button[aria-label^="Expand thread"]');
console.log(`Found ${expandButtons.length} expand buttons`);
expandButtons.forEach(button => button.click());
const moreRepliesButtons = document.querySelectorAll('button.text-tone-2.text-12:not([aria-expanded="true"])');
console.log(`Found ${moreRepliesButtons.length} 'more replies' buttons`);
moreRepliesButtons.forEach(button => button.click());