Many people use RSS feeds as the primary means to access news and information. RSS is anonymous and does not require you to log in.
Though YouTube generates RSS feeds for its channels, it does not display them (to human visitors) or advertise them (to browser software). If you prefer to browse YouTube videos via RSS, then you have to manually construct the feed URL for each channel.
I decided to automate it using this Greasemonkey script. A few seconds after a YouTube video page gets loaded, the JavaScript adds an RSS icon image next to the channel name. It links the image to the RSS feed of the YouTube channel. (The RSS icon works seamlessly as it is from Google and is used in its “News” pages.) The Greasemonkey
script also adds an RSS link tag to the HTML HEAD
section so that browsers can activate their RSS feed button.
document.addEventListener("DOMContentLoaded", startItDelayed, false);
function startItDelayed() {
if (document.getElementById("YT_RSS_Feed") == null) {
window.setTimeout(addRssButton, 5000);
}
}
function addRssButton() {
var oDivs = document.getElementsByTagName("div");
if ((oDivs != null) && (oDivs.length > 0)) {
for (var i = 0; i < oDivs.length; i++) {
if (oDivs[i].className == "yt-user-info") {
var oAnchors = oDivs[i].getElementsByTagName("a");
if ((oAnchors != null) && (oDivs.length>1)) {
var bFound = false;
for (var j = 0; j < oAnchors.length; j++) {
if (oAnchors[j].href.substring(0,
"https://www.youtube.com/channel/".length) ==
"https://www.youtube.com/channel/") {
var sChannelId = oAnchors[j].href.substring
("https://www.youtube.com/channel/".length);
var oRssElement = document.createElement("a");
oRssElement.id = "YT_RSS_Feed";
oRssElement.href =
"https://www.youtube.com/feeds/videos.xml?channel_id=" + sChannelId;
oRssElement.innerHTML =
"<img src=\"https://www.google.com/images/rss.png\"
style=\"margin: auto 1em; \" />";
oAnchors[j].appendChild(oRssElement);
var oLinkElement = document.createElement("link");
oLinkElement.setAttribute("rel", "alternate");
oLinkElement.setAttribute("title", oAnchors[j].textContent);
oLinkElement.setAttribute("type", "application/rss+xml");
oLinkElement.setAttribute("href",
"https://www.youtube.com/feeds/videos.xml?channel_id=" + sChannelId);
document.getElementsByTagName("head")[0].appendChild(oLinkElement);
bFound = true;
break;
}
}
if (bFound) { break; }
}
}
}
}
}
A YouTube channel listing in the Bamboo RSS feed reader (a Firefox add-on or extension).
RSS provides an easier way to check Youtube channels. All that matters to YouTube is that people see their ads. RSS does not block ads and so no problem. Viewers who rely on subscriptions are likely to miss new but not so fresh videos if they don’t log in regularly. (Such videos get folded/wrapped/hidden as newer videos are published.) RSS feeds ensure that viewers are more likely to get to know about a new video’s existence.
And, to use this script, you will need the Greasemonkey
add-on in the browser. It can be installed from the Firefox/Seamonkey browser add-on search page (Tools – Add-ons from the main menu).