Transfer subreddit subscriptions from one account to the other

by jakelauer

HTML

<ol>
    <li><span>Open your old reddit account in Chrome (we will call this TAB 1).</span></li>
    <li><span>Open the subreddit panel and wait for it to load</span></li>
    <li><span>In another tab (TAB 2), open reddit, log out, and then log in with your new account.</span></li>
    <li><span>TAB 1 - Hit F12 to open the developer tools, then click "Console"</span></li>
        <li><span>TAB 1 - Paste the code below into it and hit enter. Over the next few minutes, Chrome will loop through your old account's subreddits, load them in a small new window, click the subscribe button, then close the window. Don't worry, it will not unsubscribe you from things you are subscribed to.</span></li>
</ol>

CSS

li
{
    margin-bottom: 10px;
    font-weight: bold;
    font-family: sans-serif;
}

span
{
    font-weight: normal;
}

JavaScript

var $els = [];

$('#srList a').each(function(){ 
	$(this).attr('target', '_null'); 
	$els.push($(this))
})

var opened = null;
var i = 0;

nextThing();

function nextThing(){
	opened = window.open($els[i].attr('href'), '', "width=100,height=100");
	$(opened).load(function(){
		$(opened.document).find('.subscribe-button .add').trigger('click')
		i++;
		setTimeout(function(){
			opened.close();
			nextThing();
		}, 500)
	})
}