Skip to content

Instantly share code, notes, and snippets.

@ldotlopez
Last active June 11, 2024 10:12
Show Gist options
  • Save ldotlopez/d70282a79c008ea3c24c3fc2b04af0c0 to your computer and use it in GitHub Desktop.
Save ldotlopez/d70282a79c008ea3c24c3fc2b04af0c0 to your computer and use it in GitHub Desktop.
x.com-cleanup-interests.js
// https://x.com/settings/your_twitter_data/twitter_interests
function getRandomInt(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
Array.from(
document.querySelectorAll('input')
).filter((x) => {
return x.getAttribute('type') == 'checkbox' && x.checked
}).forEach((x, idx) => {
setTimeout(() => {
x.parentElement.parentElement.parentElement.click();
}, (idx + 1) * getRandomInt(500, 10000));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment