Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hyperreality/e0848104c471e2d242c29c4ac31de68a to your computer and use it in GitHub Desktop.
Save hyperreality/e0848104c471e2d242c29c4ac31de68a to your computer and use it in GitHub Desktop.
And auto-subscribe to favourite subreddits
// To remove the inane default subreddits automatically
// Go to https://www.reddit.com/subreddits/ and paste the following code into your browser console
function clickSubredditButtons(buttons) {
var i = buttons.length;
setTimeout(function() {
buttons[0].click()
if (--i) clickSubredditButtons(buttons.slice(1));
}, 500)
}
clickSubredditButtons($('.sidecontentbox').find('.remove'))
// The same function can easily be used to subscribe to your favourite subreddits
// Fill up the mySubreddits array with the subreddits you want to subscribe to
// Then paste those two lines into your browser console
var mySubreddits = ['philosophy', 'DesirePath'];
location.assign('https://www.reddit.com/r/' + mySubreddits.join('+'));
// Then use the first function above again, except this time the final line is
clickSubredditButtons($('.sidecontentbox').find('.add'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment