Skip to content

Instantly share code, notes, and snippets.

@tadwohlrapp
Forked from AymaneHrouch/autosub_reddit.js
Last active April 15, 2023 08:31
Show Gist options
  • Save tadwohlrapp/6ffba8822955f39f2a0bebcf9481552d to your computer and use it in GitHub Desktop.
Save tadwohlrapp/6ffba8822955f39f2a0bebcf9481552d to your computer and use it in GitHub Desktop.
Auto bulk subscribe to all your subreddits after moving to a new Reddit account
/*
Way better than Reddit's official FAQ suggestion: https://reddit.zendesk.com/hc/en-us/articles/205243365
1. Visit https://old.reddit.com/subreddits/mine using your old account
2. Find the link "multireddit of your subscriptions" in the sidebar, and copy its URL
The URL will look like this: https://old.reddit.com/r/[subreddit1+subreddit2+...+subredditN]
Please note that if you have a lot of subreddits the link might not work because there's a limit to the link's length
In that case you might want to split the link in two or three links
3. Visit that link (or links) using your new account
4. Open the console by pressing F12 (or Cmd+Opt+J on Mac) and then clicking the console tab.
5. Paste the code below and press enter. You're welcome :)
*/
const allSubs = Array.from(document.querySelectorAll(".option.add.active")), count = allSubs.length
console.log(`Found ${count} subs to join`)
let progress = 0, subs = setInterval(() => {
const sub = allSubs.shift()
if (!sub) {
clearInterval(subs)
if (progress > 0) console.log(`%cAll done! You joined ${progress} new subreddits 🎉`, 'font-weight: bold')
return
}
sub.click()
progress++
console.log(`${progress}/${count}: ${sub.parentNode.dataset.sr_name}`)
}, 500)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment