https://github.com/IATOA/yt-comment-info
My first approach at JavaScript, was forking and building on top of this extension. I report back, smiling, that I managed to extend it's feature set to add everything I wanted.
I am sure it will be of use for people who want to explore what "gets clicks" on youtube, or just get some inspiration, or maybe even, like me, love the thrill of the hunt for good stuff online (which there is a lot of and most of it is ignored by the terrifying beast of "the algorithm").
Morover this addon multiplies the joy of getting a comment on your youtube video, because you can see without a click the creations of person that considered your videos worthwhile enough to comment.
Firefox download link/Chrome download link
Chrome download link is in fact just instructions to install it, because getting the addon packaged by Chrome to install on click/have it posted on Chrome web store costs $5 and I am cheap
Original yt-comment -sub-count addon, I am very grateful for it, building a stable foundation for what I wanted to do, also for meticulously commenting the code which allowed me, a complete JavaScript layman, figure out which part of the code does what.
The features I added:
It was possible to extract all the information in this block from the same piece of fetched data the original addon got the subscription count from, I am very happy about it, the addon does not interact with YouTube servers over what the original does, which safeguards it from being suspected by youtube as malicious and being rate limited.
Bolded elements of the list act as link to he respective parts of the channel of the commenter.
Tooltip shown after hovering on the video count shows up to 20 videos that were found on the commenter's channel, videos shown depend on the playlists presented in the profile, on some channels it can be more than 60, I limited it because a giant blob of text was overbearing, video duration is included as it's extracted from the basic info about the video for the visually impaired.
Small, low resolution thumbnail is shown when the title is hovered, getting rid of black bars at the top and bottom of the thumbnail that sometimes show up would require computer vision as they are dependent on the video width/height ratio so I refrained from doing so, and decided it's nice that the image box is consistent.
Hadn't done that much over what the original extension's author did, I didn't touch the part of code that interacted with the DOM (a programmable way to place objects in specific places of the html), I just wrote around the original author's code. After figuring out few more regexes to extract the information I want, everything else was very basic string manipulation, bigger interactive features on hover I implemented with tools I am more accustomed to - HTML/CSS hacks.
for (const title of titles) {
forloopoutput += title[1] + "
";
forIter += 1;
if (forIter > 19) break;
}
// 
 is a html code for a newline
// We create and style videocount to behave as a link to our hidden playlist
// We add a newline seperated list of titles created by the for loop above on hover (tooltip with "title")
const textVidCount = "<a style=\"color:#ddd;\" href=\""+ playlist + "\" title=\"" + forloopoutput + "\">" + VidCount[1] + "</a>";
Then a little later.
// We prepare a frame that will be shown on hover which has a link to a low resolution video thumbnail,
// We are using "background-image" to be conservative with the requests sent to the server (the images don't preload when invisible).
const hoverVidThumbnail = "<div class=\"description\" style=\"position:absolute;border:1px solid #000;width:140px;height:105px;inset-block-start:-105px;background-image:url("+ finalVidThumbnail +");background-size:cover;\"></div>";
// We prepare the block of html, the video name and all the functions related to it
const finalVidName = "<a class=\"tiptext\" style=\"color:#ddd;text-decoration:none;\" href=\"https\://youtu.be/" + nulltestNewVidID + "\">" + hoverVidThumbnail + textVidName + "</a>";
//We combine output of all the regexes done over the entire function
return SubCountText + ' | ' + textVidCount + ' | <b>' + finalVidName + '</b> | ' + VidLenght + ' | '+ VidViews[1] + ' | ' + VidDate[1];
Equivalent part of the original function looked like this (it just didn't need to do more).
//We return the result of the regex searching for the subscription count.
return match[1];
The thumbnail on hover is achieved with a separate function that shoves in a little style tag that defines a css that changes the object from hidden to shown into the documents head, here I added some whitespaces for readability. > operator in css signifies that the once a :hover happens, on the elements inside of the one that was hovered should have a respective style change.
const cssHack = "
<style>
.description{display:none;}
.tiptext:hover > .description{display:inline-block;}
</style>
";
document.head.insertAdjacentHTML("beforeend", cssHack);
It was a cool thing to do, it taught me a little bit about JavaScript, I am glad it works. I hope it will be of use for some people to explore the internet more and find some hidden gems.
After finishing up coding, uploading it onto github and writing down this post I found an extension that got developed in the exact same thing I did develop mine, forked the subscription count addon and building on top of it modified it to show a lot more information about the commenter (it also shows the "about" text on hover on one block but it was empty with the example I picked). Firefox link It won't work for chrome without modifications, it's developed with Firefox in mind as far as I understand.
I felt a little discouraged that my idea wasn't original, nevertheless you dear reader are in luck because you have not one but two addons that aid youtube exploration to chose from!
Ages ago, I saw a YouTuber use some advanced analytics tool that among other things showed a subscription and video counts of commentators, it was not the point of the video and it was never elaborated upon what tool that was, after searching I found that some big multi-use addon that looked eerily similar but I couldn't figure out how to enable that feature, moreover it was a freemium tool so I assumed there was a paywall involved at some point. I searched for a while longer and found the addon I thought could be of use as a starting point, I wrote some notes about how would I approach extracting the video count but had given up because of feeling like the challenge would be insurmountable.
Three or so years later, I was thinking about the world, frustrated about how internet was seemingly slopifying even more than it already did, I related this feeling to general malaise of society, how generations before mine seemingly hadn't striven enough to push back against trends that exemplify a form of joyful rot, using startup slang "removing friction", making things like watching ads, spending money easier while also innately connecting with with rewarding our most basal needs, to a point of decadence. I don't like how it's so vehement about squeezing away time for exploration, for thinking, weighing your choices, waiting, or striving for something.
That's why I decided to refresh my old idea, I got really motivated by how it allowed for pushing back a little, for doing something I felt so frustrated about people that I inherited the internet from for NOT doing, I always thought options for exploring the treasure trove of deeply engaging evergreen/verdant/lush media on youtube atrophied and "release date this week" is seen as the most valuable feature of a video by the all encompassing algorithm. Doing what I wanted with this addon was much easier than I expected, again the biggest hurdles lied in my mind.
I won't fiddle with this addon more, I conciser it done. I don't really use standalone youtube anymore anyways, for now I have to focus on other things but I will want to implement the features of this extention in a freetube fork, another insurmountable challenge.