Twitter - Bring the Reply Counter Back (OBSOLETE)

Shows an accurate count of replies, retweets, and likes for the currently selected tweet.

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

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

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

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

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

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

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

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

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

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

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

/* ==UserStyle==
@name         Twitter - Bring the Reply Counter Back (OBSOLETE)
@description  Shows an accurate count of replies, retweets, and likes for the currently selected tweet.
@namespace    lednerg
@version      20.7.32
@author       lednerg
@homepageURL  https://greasyfork.org/scripts/407471-twitter-bring-the-reply-counter-back
@license      CC-BY-NC-SA-4.0
@preprocessor stylus

@var    select      fontColor       "What is your Twitter color scheme?"     {
        "Default*":   "default",
        "Dim":        "dim",
        "Lights out": "lightsOut"
    }
@var    checkbox    customCheckbox  "Use custom font color instead"         0
@var    color       customColor	    "Custom font color"                     #1da1f2
@var    range       textWidth       "Width (adjust if text is overlapping)" [40, 20, 60, 2, '%']
==/UserStyle== */

@-moz-document regexp("https?:\\/\\/twitter\\.com\\/.+\\/status\\/[0-9]*") {

	.css-1dbjc4n.r-1oszu61.r-1kfrmmb.r-1efd50x.r-5kkj8d.r-18u37iz.r-ahm1il.r-a2tzq0::after {
		font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", sans-serif !important;
		text-transform: capitalize !important; /* because Twitter capitalizes Retweet but nothing else */
		max-width: textWidth !important; /* percentage of the entire Tweet width */
		position: absolute !important; /* allows the text to be repositioned independently */
		top: -54% !important; /* for vertically aligning the text */
		right: 1% !important; /* adds a slight margin on the right */
		text-align: right !important; /* needed in case there's a wrap-around */
		transform: translateY(-50%) !important; /* for vertically aligning the text */
		-ms-transform: translateY(-50%) !important; /* needed for... ie?  */
		content: "(" attr(aria-label) ")"; /* the secret sauce */
	}

    /*  The rest of this is for letting you change the color of the text from within Stylus
        Go to a Tweet and click the gear icon next to this stylesheet's name in the Stylus menu */

	if not customCheckbox {
		if fontColor == "default" {
			.css-1dbjc4n.r-1oszu61.r-1kfrmmb.r-1efd50x.r-5kkj8d.r-18u37iz.r-ahm1il.r-a2tzq0::after {
				color: #657786 !important;
			}
		}
		if fontColor == "dim" {
			.css-1dbjc4n.r-1oszu61.r-1kfrmmb.r-1efd50x.r-5kkj8d.r-18u37iz.r-ahm1il.r-a2tzq0::after {
				color: #8899a6 !important;
			}
		}
		if fontColor == "lightsOut" {
			.css-1dbjc4n.r-1oszu61.r-1kfrmmb.r-1efd50x.r-5kkj8d.r-18u37iz.r-ahm1il.r-a2tzq0::after {
				color: #6e767d !important;
			}
		}
	}

	if customCheckbox {
		.css-1dbjc4n.r-1oszu61.r-1kfrmmb.r-1efd50x.r-5kkj8d.r-18u37iz.r-ahm1il.r-a2tzq0::after {
			color: customColor !important;
		}
	}

}