Last active
June 11, 2024 10:12
-
-
Save ldotlopez/d70282a79c008ea3c24c3fc2b04af0c0 to your computer and use it in GitHub Desktop.
x.com-cleanup-interests.js
This file contains 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
// 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