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

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name        Expand Subreddit List Simple
// @namespace   user paperwing from greasyfork.org
// @include     https://*.reddit.com/*
// @version     1.0151
// @grant       none
//
// @description:en   Simple program to expand the Reddit top bar to show all subscribed subreddits. Should work on all browsers.
// @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
// ==/UserScript==

var ec, e, cs;

e = document.getElementById("sr-header-area");

if (e !== null) {
  e.style["white-space"] = "normal";

  ec =  document.getElementsByClassName("sr-list");


  ec = document.getElementsByClassName("sr-list")[0].childNodes[2].childNodes;

  for (var i = 0; i < ec.length; i++) {

    ec[i].style["white-space"] = "normal";

  }

  var e2 = document.getElementsByClassName("sr-list")[0].childNodes[2];

  e.style["height"] = (e2.offsetHeight + 10) + "px";
}

var fixprofile = function(){ 
	var profile = document.getElementsByClassName("SubscriptionBar")[0]

	profile.style["height"] = "auto";
	profile.style["white-space"] = "normal";
}

setTimeout(fixprofile, 500);