Skip to content

Instantly share code, notes, and snippets.

@eviltester
Last active May 24, 2026 12:20
Show Gist options
  • Select an option

  • Save eviltester/11093f0e4c501a41990e227393184eda to your computer and use it in GitHub Desktop.

Select an option

Save eviltester/11093f0e4c501a41990e227393184eda to your computer and use it in GitHub Desktop.
uncheck twitter interests
var timer=100;document.querySelectorAll("div > input[type='checkbox']:checked").forEach((interest) => {setTimeout(function(){interest.click()},timer);timer+=2000;});
@AlexMnrs

AlexMnrs commented Feb 10, 2022

Copy link
Copy Markdown

@djlank630 That's actually how I did it. I repeated the process step by step and nothing changes. When I unblock the p13n_preferences.json url, check and uncheck any interest and refresh, everything is checked again. Thanks anyway!

@RobinFrcd

Copy link
Copy Markdown

Thanks for the gist, here's one to dismiss all topics suggested by twitter on this page: https://twitter.com/YOURUSERNAME/topics

https://gist.github.com/RobinFrcd/8b52224f05db01e7465f67f3598e42d6

@Hizaak

Hizaak commented Mar 25, 2022

Copy link
Copy Markdown

[ To completely block Twitter's subjects / topics / "You might be interested in" etc. ]
I was looking for a while to find back THIS solution, wich seems to actually be one of the most efficient to prevent this kind of annoying stuff that Twitters shows us : https://twitter.com/JonoHimself/status/1107743787856465921

@tomyvi

tomyvi commented Aug 2, 2022

Copy link
Copy Markdown

Works like a charm, thanks @eviltester !!

@zhSHUVO

zhSHUVO commented Dec 19, 2022

Copy link
Copy Markdown

This one works for me in Chrome

  1. Browse to https://twitter.com/settings/your_twitter_data/twitter_interests
  2. Open developer tools and enter following one-liner into your console
$$('input:checked').forEach( (w) => { w.click() } ); console.log('done');

this worked for me quicker then other solutions, i'm using brave browser. thanks.

@kissu

kissu commented Dec 19, 2022

Copy link
Copy Markdown

Twitter is kinda dead nowadays πŸ’€, I guess we can safely all move toward Mastodon. πŸ‘

@amalic

amalic commented Dec 19, 2022

Copy link
Copy Markdown

This one works for me in Chrome

  1. Browse to https://twitter.com/settings/your_twitter_data/twitter_interests
  2. Open developer tools and enter following one-liner into your console
$$('input:checked').forEach( (w) => { w.click() } ); console.log('done');

this worked for me quicker then other solutions, i'm using brave browser. thanks.

πŸ‘

@jcambien

Copy link
Copy Markdown

If you have a lot of checked interests, X will start to ignore your requests and return a 503 HTTP error if you uncheck them too fast.
Here is a script that uncheck interests every 2 seconds, just launch it and wait until the counter has reached the end.

var counter = 0;
var wait = 2000;
var interests = $$('input:checked');

interests.forEach( (w) => {
    var current = counter;
    setTimeout(() => {
        console.log(current + '/' + interests.length);
        w.click();
    }, wait * counter);
    counter++;
});

@GabrielMarqueseSouza

Copy link
Copy Markdown

I used the code @jcambien wrote and it worked as expected, though the rate limiter was triggered after a while. Nevertheless, I waited a few minutes and reran the script, then all checkboxes were unchecked.

@20of

20of commented Feb 14, 2025

Copy link
Copy Markdown

Is it possible to add custom "interests" to this json? or are they checked serverside against their list?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment