Skip to content

Instantly share code, notes, and snippets.

@helium18
Last active April 26, 2022 15:58
Show Gist options
  • Save helium18/53a1626f7b5bd78871b36d814dca82a3 to your computer and use it in GitHub Desktop.
Save helium18/53a1626f7b5bd78871b36d814dca82a3 to your computer and use it in GitHub Desktop.
Migrate joined reddit subreddits to libreddit subscriptions

Switch to libredd.it (from reddit)

Subscribe to all of your joined reddit subreddits in libreddit.

  1. Head over to reddit's subscription page
  2. Open dev tools and paste this snippet.
let subs = () => {
  let result = "";
  Array.from($(".subscription-box").find("li").find("a.title")).forEach(
    (val) => {
      // Usernames start with `u/`. We ignore them as they cause trouble
      if (!val.innerText.startsWith("u/")) {
        result += val.innerText + "%2b"; // Subreddits are separated by `%2b`
      }
    }
  );
  return result.slice(0, -3);
};

let baseUrl = "https://libredd.it/settings/restore/?subscriptions=";
let subreddits = subs();
let finalUrl = `${baseUrl}${subreddits}`;

// redirect
window.location.replace(finalUrl);
  1. Then curse reddit for making such a shitty frontend 😡😡😡

Suggestions are welcome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment