Wednesday, July 12, 2023

Clear Twitter "interests" list

Twitter subscribes you to a list of interests:

https://twitter.com/settings/your_twitter_data/twitter_interests

Some code to help you clear it:

const sleep = t => new Promise(r => setTimeout(r, t));

async function purge() {
  const nodes = document.querySelectorAll('input[type="checkbox"]:checked');

  let i = 0;
  for (const node of nodes) {
    document.title = `${++i} / ${nodes.length}`;
    console.log(new Date().toISOString(), i, node.closest('label').querySelector('span').textContent);
    node.click();
    await sleep(3_000);
  }
}
purge().catch(console.error);

No comments: