Skip to content

Instantly share code, notes, and snippets.

@TheSethRose
Created October 26, 2025 19:19
Show Gist options
  • Select an option

  • Save TheSethRose/63d4cd0fd3b9fe33c3e51e83f87da26f to your computer and use it in GitHub Desktop.

Select an option

Save TheSethRose/63d4cd0fd3b9fe33c3e51e83f87da26f to your computer and use it in GitHub Desktop.
X Twitter Interests Bulk Uncheck Script
// X Twitter Interests Bulk Uncheck Script
// This script unchecks all interest checkboxes on the Twitter interests settings page
// by simulating clicks with a 1.5 second delay between each to avoid rate limiting
const section = document.querySelector('section:nth-child(2)');
const checkboxes = section.querySelectorAll('input[type="checkbox"]');
let uncheckedCount = 0;
const uncheck = async () => {
for (let i = 0; i < checkboxes.length; i++) {
const checkbox = checkboxes[i];
// Only process currently checked boxes
if (checkbox.checked) {
const label = checkbox.closest('label');
const nameElement = label?.querySelector('[dir="ltr"]');
const name = nameElement?.textContent || `Interest ${i + 1}`;
// Trigger click event to notify React and send API request
checkbox.click();
uncheckedCount++;
console.log(`✓ Clicked: ${name}`);
// Wait 1.5 seconds before next click to avoid rate limiting
await new Promise(resolve => setTimeout(resolve, 1500));
}
}
console.log(`\n✓ Complete! Total interests unchecked: ${uncheckedCount}`);
};
// Start the unchecking process
uncheck();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment