Twitter - Bring the Reply Counter Back (OBSOLETE)

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

/* ==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;
		}
	}

}