Skip to content

Instantly share code, notes, and snippets.

@tkh44
Created August 15, 2013 00:22
Show Gist options
  • Save tkh44/6237149 to your computer and use it in GitHub Desktop.
Save tkh44/6237149 to your computer and use it in GitHub Desktop.
Subscribe to all subreddits in a multireddit link
(function getMahSubreddits(a) {
var myReddits = a.split('/r/')[1].split('+');
myReddits.forEach(function(s) {
$.get('http://reddit.com/r/'+s+'/about.json')
.success(function(data) {
var name = data.data.name;
console.log(name);
subscribe(name);
});
})
})('PASTEMULTIREDDITLINKHERE');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment