youtube icon indicating copy to clipboard operation
youtube copied to clipboard

💡Sub Counts

Open Doofus16 opened this issue 1 year ago • 5 comments

YouTuber sub counts have been abberviated for the past 5-6 years.

⚬ PROBLEM:

It's very inconvenient and I always need to use SocialBlade to see the full count. I don't understand who thought that looked better. Seriously.

⚬ SOLUTION:

I would like to see a simple option that enables you to see exactly that and that keeps everything else the same.

⚬ ALTERNATIVES:

⚬ RELEVANCE / SCOPE:

⚬ "SIDE EFFECTS":

⚬ CONTEXT: // Thank you!

SHORT Table (Summary)
Problem Abberviated YT Sub Counts
Solution Option that enables you to see them
Alternatives
Scope
Side effects
Context

Doofus16 avatar Jul 27 '25 21:07 Doofus16

hello can u please assign to me this, il work on it as soon as possible, thank u

MoriMomo avatar Aug 03 '25 11:08 MoriMomo

yoo so this is what I did

After some testing, I found a couple of things worth mentioning.

  • YouTube does not expose the exact, real-time full subscriber count in the DOM or public APIs for most channels.
  • The extension cannot fetch the true, unrounded subscriber count directly from YouTube due to platform restrictions.

There is an alternative way to do it, but it only shows public data, which is estimated using SocialBlade and/or similar services. However, this method does not provide real-time or guaranteed accuracy and cannot be accessed programmatically from browser extensions due to CORS and scraping limitations.

The only way to know the full subcount is in YouTube Studio by the creators themselves, this is proven here: here

If ya wanna test things out, here's the code:

// Feature: Show full subscriber count instead of abbreviated
ImprovedTube.extractSubscriberCount = function (subscriberCountNode) {
	if (!subscriberCountNode) {
		subscriberCountNode = document.getElementById('owner-sub-count');
	}
	if (subscriberCountNode) {
		var abbreviatedText = subscriberCountNode.textContent.trim();
		var fullCount = null;

		// Try to get full count from data attributes or API
		if (subscriberCountNode.dataset && subscriberCountNode.dataset.subscriberCount) {
			fullCount = subscriberCountNode.dataset.subscriberCount;
		} else {
			// Fallback: Try to parse from abbreviated text
			fullCount = parseFloat(abbreviatedText.replace(/[^0-9.]/g, ''));
			if (abbreviatedText.includes('K')) {
				fullCount *= 1000;
			} else if (abbreviatedText.includes('M')) {
				fullCount *= 1000000;
			}
		}

		ImprovedTube.subscriberCount = fullCount;

		// Debug output
		console.log('[ImprovedTube] extractSubscriberCount:', {
			abbreviatedText,
			fullCount,
			node: subscriberCountNode
		});

		// If option enabled, show full count
		if (ImprovedTube.storage.show_full_subscriber_count === true && fullCount) {
			subscriberCountNode.textContent = fullCount.toLocaleString();
		}
	}
};

Let me know if you want to add or change anything, and thanks.

MoriMomo avatar Aug 03 '25 13:08 MoriMomo

yoo so this is what I did

After some testing, I found a couple of things worth mentioning.

  • YouTube does not expose the exact, real-time full subscriber count in the DOM or public APIs for most channels.
  • The extension cannot fetch the true, unrounded subscriber count directly from YouTube due to platform restrictions.

There is an alternative way to do it, but it only shows public data, which is estimated using SocialBlade and/or similar services. However, this method does not provide real-time or guaranteed accuracy and cannot be accessed programmatically from browser extensions due to CORS and scraping limitations.

The only way to know the full subcount is in YouTube Studio by the creators themselves, this is proven here: here

If ya wanna test things out, here's the code:

// Feature: Show full subscriber count instead of abbreviated
ImprovedTube.extractSubscriberCount = function (subscriberCountNode) {
	if (!subscriberCountNode) {
		subscriberCountNode = document.getElementById('owner-sub-count');
	}
	if (subscriberCountNode) {
		var abbreviatedText = subscriberCountNode.textContent.trim();
		var fullCount = null;

		// Try to get full count from data attributes or API
		if (subscriberCountNode.dataset && subscriberCountNode.dataset.subscriberCount) {
			fullCount = subscriberCountNode.dataset.subscriberCount;
		} else {
			// Fallback: Try to parse from abbreviated text
			fullCount = parseFloat(abbreviatedText.replace(/[^0-9.]/g, ''));
			if (abbreviatedText.includes('K')) {
				fullCount *= 1000;
			} else if (abbreviatedText.includes('M')) {
				fullCount *= 1000000;
			}
		}

		ImprovedTube.subscriberCount = fullCount;

		// Debug output
		console.log('[ImprovedTube] extractSubscriberCount:', {
			abbreviatedText,
			fullCount,
			node: subscriberCountNode
		});

		// If option enabled, show full count
		if (ImprovedTube.storage.show_full_subscriber_count === true && fullCount) {
			subscriberCountNode.textContent = fullCount.toLocaleString();
		}
	}
};

Let me know if you want to add or change anything, and thanks.

Thanks, sorry for the late reply, I was sick these last few days. I'd like this to be added as an update to the already existing extension.

Doofus16 avatar Aug 08 '25 11:08 Doofus16

Hey, sorry for the late reply,

Are u sure? It just adds zero to the back instead of k/m, because the live count or the specific count is not aavailabledo to privacy issues?

if so i could try, thanks

MoriMomo avatar Aug 15 '25 14:08 MoriMomo

Hey, sorry for the late reply,

Are u sure? It just adds zero to the back instead of k/m, because the live count or the specific count is not aavailabledo to privacy issues?

if so i could try, thanks

I didn't know that. TF do they mean privacy issues??? Is there a way to put socialblade's live count where the normal yt one is? Your code looks good, even though I don't understand it since I can't code. Thanks and sorry for the late reply.

Doofus16 avatar Aug 22 '25 16:08 Doofus16