Multireddit Followed Users

Creates a multireddit with only the users you follow (excludes your subscribed subreddits)

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Multireddit Followed Users
// @namespace    https://www.reddit.com/u/Fergobirck
// @version      1.0
// @description  Creates a multireddit with only the users you follow (excludes your subscribed subreddits)
// @author       Fergobirck
// @match        https://www.reddit.com/subreddits/
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    var filtered = [];
    var linkPosition = document.querySelectorAll(".subscription-box")[0].getElementsByTagName('ul')[0].getElementsByTagName('a')[0];
    var subscribed = document.querySelectorAll(".subscription-box")[0].getElementsByTagName('ul')[0].querySelectorAll('li');

    subscribed.forEach((item, index) => {
      var subName = item.getElementsByClassName('title')[0].innerHTML;
      if (subName.substr(0, 2) == "u/") {
          filtered.push(subName.replace("u/", "u_"));
      }
    });

    var html = "<a href=\"https://www.reddit.com/r/" + filtered.join("+") + "\" class=\"title\">multireddit of your followed users</a><br\>"
    linkPosition.insertAdjacentHTML("beforebegin", html);
})();