As posted on: https://timvisee.com/blog/list-export-your-subreddits/
To obtain a list of your subreddits, do the following:
-
First make sure you're logged in on reddit, on a desktop browser.
-
Then visit reddit.com/subreddits.
-
Then put the following snippet in your browsers address bar, and press
Enter
.
Make surejavascript:
is included at the beginning, your browser might remove it while copy-pasting for security reasons:javascript:$('body').replaceWith('<body>'+$('.subscription-box').find('li').find('a.title').map((_, d) => $(d).text()).get().join("<br>")+'</body>');javascript.void()
-
The reddit page is replaced with a list of all the subreddits you're subscribed to.
Here is the expanded snippet:
// Build a list of subreddits with break lines between them
var subs = $('.subscription-box')
.find('li')
.find('a.title')
.map((_, d) => $(d).text())
.get()
.join("<br>"));
// Replace the page with a list of subreddits
$('body').replaceWith('<body>' + subs +'</body>');
javascript.void()
It finds all items from the subreddit list in the sidebar on the page, and builds an array of subreddit names from it. The array is concatinated with breaklines. The page is then replaced with this list.
If anyone just wants a list of links, this should work