Expand Subreddit List Simple

Expands the Reddit top bar to show all subscribed subreddits. NOTE: I am moving the script to here: https://openuserjs.org/scripts/Sanakazubi/Expand_Reddit_Subscription_Bar

  1. // ==UserScript==
  2. // @name Expand Subreddit List Simple
  3. // @namespace user paperwing from greasyfork.org
  4. // @include https://*.reddit.com/*
  5. // @version 1.0151
  6. // @grant none
  7. //
  8. // @description:en Simple program to expand the Reddit top bar to show all subscribed subreddits. Should work on all browsers.
  9. // @description Expands the Reddit top bar to show all subscribed subreddits. NOTE: I am moving the script to here: https://openuserjs.org/scripts/Sanakazubi/Expand_Reddit_Subscription_Bar
  10. // ==/UserScript==
  11.  
  12. var ec, e, cs;
  13.  
  14. e = document.getElementById("sr-header-area");
  15.  
  16. if (e !== null) {
  17. e.style["white-space"] = "normal";
  18.  
  19. ec = document.getElementsByClassName("sr-list");
  20.  
  21.  
  22. ec = document.getElementsByClassName("sr-list")[0].childNodes[2].childNodes;
  23.  
  24. for (var i = 0; i < ec.length; i++) {
  25.  
  26. ec[i].style["white-space"] = "normal";
  27.  
  28. }
  29.  
  30. var e2 = document.getElementsByClassName("sr-list")[0].childNodes[2];
  31.  
  32. e.style["height"] = (e2.offsetHeight + 10) + "px";
  33. }
  34.  
  35. var fixprofile = function(){
  36. var profile = document.getElementsByClassName("SubscriptionBar")[0]
  37.  
  38. profile.style["height"] = "auto";
  39. profile.style["white-space"] = "normal";
  40. }
  41.  
  42. setTimeout(fixprofile, 500);