Another Twitter script

I have over 500 "interests" according to Twitter, and I'd rather not. So I made this script that will go through and uncheck all your interests. Go to your interests settings page, paste the script below into your console, run it, and wait. There's a 2 second delay between unchecking interests because if it goes any faster than that the API craps out after a while and it doesn't recover for about 10 minutes.

const checks = $0.querySelectorAll('input[type="checkbox"][checked]');
let current = 0;

console.info('Total: ' + checks.length);

const uncheckIt = () => {
  const item = checks.item(current)

  console.log('Item', item);

  if (item) {
    item.previousSibling.click();
  }

  current++;

  if (current < checks.length) {
    setTimeout(() => { uncheckIt(); }, 2000);
  } else {
    console.info('Done!!!');
  }
}

uncheckIt();

Comments (0)

There are no comments to display.

Leave A Comment