Tagged: youtube

Youtube is a willing enabler of and profiteer from video piracy – Google Cloud hosts tons of pirated movies and sites faster than Youtube

Youtube can tell whether a video is a from a movie or one shot by a private individual. In addition to that, the movie owner would have provided content IDs of their copyright works to Youtube. If pirated copies of the movie are uploaded, Youtube will block the video or run ads on it depending on the option chosen by the movie owner. If a movie owner does not have a deal with Youtube, then Youtube displays ads and pockets the money. There are thousands of copyrighted works including movies on which no claim has yet been made. Youtube, which on-the-fly censors videos for words suggestive of conspiracy theories and ‘vaccine misinformation’, pretends this is kosher. Some bootleggers upload movies using special lookalike Unicode characters in the title that resemble ordinary text. The Youtube search is smart enough to identify these fraud attempts but does not seem to be notifying the movie owners. Another thing I found (as a fan of 80s movies) is that many movies are hosted on Google servers. In fact, Amazon AWS, Microsoft Azure and Google Cloud seem to host a lot of video bootleg sites and their files. These video sites are very fast — faster than Youtube! Earlier, you could search a name of a 80s movie and find a VHS bootleg copy on Youtube. But there are several movies that are not available on Youtube. Yet, they are available on Google servers. In fact, there are sites that have a very comprehensive collection of movies, TV shows and cartoons than legitimate streaming servers. I say comprehensive because the home pages have the latest movies, which I do not watch, but the search yields hard-to-find 80s, 70s, 60s and even 50s movies. I do not know why so many people mess with torrents sites (I subscribe to TorrentFreak.coms’ RSS) when these bootleggers are streaming the latest movies from high-speed servers hosted on top cloud providers. (Tubi TV is a free legitimate streaming service I found recently. It is owned by Fox and occassionally displays ads. You do not have to register on ther site.) I guess the popup ads are very annoying. Google Ads run on these sites. From content ID system with Youtube, Google can remove these sites and their files but it does not. As long as movie makers are unaware of the scam, Google will be selling ads.

I checked today and the sites has the latest Spiderman and James Bond movies on the home page.

How to load a light version of Youtube? Welcome to YoutubeLite!

Also adds an RSS feed for the channel, direct link to videos page, and video/subtitle file downloads.

I installed Linux Mint with Mate desktop a few days ago. I hoped to move all my stuff to that the new OS but it has been delayed. I cannot use an OS unless it has been beefed up with my shell scripts, Nautilus Action Configuration scripts and my browser scripts. This is taking time.

So, I decided to switch back to my old obsolete OS and what do you know happened? The boot menu option failed to work. I then chrooted my old OS and reinstalled its boot menu. Now, that will not boot the new OS. I left it at that.

And, in my old browser, Youtube stopped its old-browser support and started loading slow heavy crappy pages with big text. My old Firefox browser is unable to load even one page!

Initially, I wrote a scrip to replace all Youtube links with Hooktube links. But their abilities are limited. So, I said “junk that” and wrote this new version of the Youtube Annoyance Remover. It is called Youtube Lite!. With it installed in the Greasemonkey add-on, I open videos in several tabs. The script waits for a while, lets the video load, mutes it, copies its video link, nukes the Youtube video player and then loads the link in a native video player of the browser. The old version used to remove the “Recommended for you” related videos but this one removes all related videos. If you want them, then open them in new tabs while the script is waiting. If you have good Internet speed, then the script may not wait at all.

YoutubeLite discards the custom video player that Youtube uses and loads the video in the native video player of the browser.

I could not load the video description in HTML. The links are not interactive. I will fix that soon.

Now, I can continue to download the videos using the DownThemAll extension. Because of persistent disturbances in the Internet and electrical connection and because of low speeds, I am unable to stream videos. I have to play them offline.

The GreaseMonkey code is available on GitHub. Use it with the GreaseMonkey Firefox add-on from the CA Archive.

If Youtube does not want to encourage these customizations, then they should do to Youtube video pages what they did to Youtube Studio pages that video uploaders have to use. That junk does not even load in my browser.

A big multinational tax-evading corporation should at least write their own Javascript code. Instead, these Google developers overload pages with hundreds of scripts from junk Javascript frameworks with their junk models-and-controllers junk! Only junk developers write this framework junk. Only junkier developers use it in their pages.

Please replace the word junk in the above paragraph with the street slang for crap.

Thank you, Carlos Maza, for preventing Google from ever again fooling millennials with false promises of making money off YouTube videos

Google skewed page views to artificially create some YouTube millionaires to attract young content creators and new audiences. Not anymore, thanks to CNN, Carlos Maza and pressure groups.

Google employees used to hit schools, colleges and universities to encourage millennials to join YouTube and post videos. They made presentations of how young people with nothing more than a phone camera could make money off videos – money based on page views. It seemed too good to be true. Youtube also created some artificial millionaires to buttress their claims.

Why do I say that YouTube created artificial millionaires? If today YouTube can surreptitiously choke traffic (shadow banning) to right-leaning channels, then after Google’s acquisition YouTube could certainly have been driving traffic to artificially “organically” grow some channels.

Besides that, YouTube does not make money, as neither do most Google services. Except for Adsense. It is a combination of creating accounting and tax evasion. Adsense is a corporate legal fiction created in multiple tax havens that the IRS and EU tax officials have refused to look closely. Every big US multinational corporation is doing the same thing. Adsense makes just enough money within the US to float Alphabet above water while secreting most of the profits away from the IRS. Adsense is more of an Irish or Dutch company than American.

YouTube Search becomes useless, as censorship decimates discoverability

After CNN campaigned against conspiracy theorist Alex Jones, advertisers asked YouTube to shadow ban channels that were too opinionated or off centre. Now, Youtube search is totally useless. Old search terms do not work. Notifications do not work. Useless videos from TV channels appear like spam in the results.

Vox Adpocalypse

Anyway, former Vox ‘journalist’ Carlos Maza waged a long crusade against a conservative YouTuber named Steven Crowder. (I put the word journalist in quotation marks because Mr. Maza says the job of a journalist is not supply the news but to censor it.)

Maza has published many openly partisan and anti-Trump videos. Crowder took him to task by giving many of his videos point-by-point rebuttals. Crowder is a comedian and he peppered his criticism with sarcastic jokes about Maza. Maza identifies himself as a ‘Marxist pig’ and has also called for violence against conservative politicians. He still took offense at Crowder’s swipes at him. Despite being a male, grownup and a ‘journalist’, he complained to Google that Crowder was bullying him. He complained to YouTube that the site was not a ‘safe space‘ for precocious man-boys like him.

YouTube reviewed Crowder’s content and found them legally safe and withing the terms of the site policy. After all, it is not Youtube’s job to protect someone from ridicule and criticism. Maza was not satisfied and went raving mad. Crowder’s channel was demonetized and censored from searches, ‘related videos’ and other places. Crowder was one of the first batch of ‘Youtube Partners’ and feels betrayed by Google.

Google-YouTube censorship deserves FTC action

Google claims it is a private company and can deal anyway it feels like with its content creators. This is not legally tenable. By making false promises and bait-switching, Google has indulged in anti-competitive and anti-consumer business practices. This invites action from Federal Trade Commission. If YouTube did not sign any agreement with its creators, it would have been legally safe but by making a contract Google has bound itself with normal business rules. It cannot indulge in censorship without proper explanation. Many class-action suits have already been filed against Youtube. One Youtuber went as far as shooting up the offices of the outfit.

Subscriptions are increasing but page views are decreasing, indicating suppression

Remember the time, when Google claimed that a programmer wrote Street Maps van code that inadverdantly collected wireless network IDs and passwords. Something similar will happen when it is discovered that Google algorithmic skewing suppressed page views to decrease payouts to content creators.

Eli, the computer guy, was another early Youtuber. He used to make lots of money from videos. He decided to become a full-time YouTuber and made investment in video and studio equipment. Now, despite having nearly one million subscribers, he gets only 1000 views on all new videos. He has also been deprived of the ability to livestream videos using some unwritten rule that his channel manager in Youtube refuses to disclose to him. Eli sometimes speaks about controversial topics. That must have upset somebody. So, some Youtube manager dedicated a few hours of his life to sit through Eli’s videos, found that livestreaming was crucial to Eli at that moment, and took away that privilege.

There are many such YouTubers. They have millions of subscribers but their channels are not recording as many views. How can this happen? With everyday, subscribers are increasing? Shouldn’t page views similarly? Who is stealing the page views if not for Google.

These content creators have been given false promises by YouTube and now their investments have been rendered useless. They abandoned their careers and their lives have been permanently ruined.

Suppressing page views has not been enough so Youtube has simply deleted or demonetized thousands of channels. Videos that have been on YouTube for years without any problems have suddenly been demonetized. If YouTube had money like earlier, this would not happen.

The new advertiser-friendly and censorship-heavy Youtube is making less money than earlier and even lesser to share with content creators. Youtube is suppressing traffic stats across the site, irrespective of the nature of the content. Everyone is suffering from low page views. This is also a clear deceptive trade practice. They have become trapped by Google. They cannot move their business elsewhere. It is time to break up Google.

A channel with 30 million subscribers struggles to get even 1 million views per video, unless it is about India.

CNN, Maza and pressure groups have ensured that Youtube is not a profitable site for independent content creators. This is good for millennials. While many young kids say that they want to be Youtubers, once they realise how little money they can make off videos and how dramatic algorithmic changes can affect their earnings, better sense will prevail. Young people will find real stable jobs offline. Thanks, Maza. You have unwittingly done something useful in your life.

A liberal left-leaning angel of peace.

How to beat Google’s censorship of YouTubers’ videos – eliminate TV shows from the results

After CNN started a campaign to ban Alex Jones from the online world, YouTube was hit with a boycott by ad agencies for promoting conspiracy videos. In response, YouTube now displays clips from TV shows in the results while videos uploaded by ordinary YouTubers have been demoted.

Recently, I was trying to find the funny video of Joe Biden posted by US president Donald Trump and found that YouTube has censored the video. In its place are numerous TV reports talking about the Trump twitter message.

If you check the results page of YouTube search, you will find a “filters” drop-down list. In this list, YouTube will allow ordering the results by “relevance” and “view count”. The default is “relevance” and by YouTube’s definition, it means TV shows are always better than videos uploaded by ordinary YouTube users. To make YouTube search work like earlier, you need to select “Video” under “Type” and “View Count” under “Sort By”.

Censored YouTube search: https://www.youtube.com/results?search_query=trump+trolls+biden

Uncensored YouTube search: https://www.youtube.com/results?search_query=trump+trolls+biden&sp=CAMSAhAB

YouTube search filter

To make this easy, I created a custom YouTube search engine XML file based on the OpenSearch standard at:


<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/"&gt;
<ShortName>Youtube</ShortName>
<Description>Youtube Search</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width="16" height="16">data:image/png;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAABILAAASCwAAAAAAAAAAAAD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8AAAD/EAAA/0AAAP9AAAD/cAAA/4AAAP+AAAD/gAAA/4AAAP+AAAD/QAAA/0AAAP8Q////AP///wD///8AAAD/YAAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA/2D///8AAAD/MAAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD/MAAA/1AAAP//AAD//wAA//8AAP//AAD//wAA//8QEP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA/2AAAP+AAAD//wAA//8AAP//AAD//wAA//8AAP//4OD//1BQ//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP+AAAD/gAAA//8AAP//AAD//wAA//8AAP//AAD/////////////wMD//yAg//8AAP//AAD//wAA//8AAP//AAD/gAAA/4AAAP//AAD//wAA//8AAP//AAD//wAA/////////////7Cw//8gIP//AAD//wAA//8AAP//AAD//wAA/4AAAP+AAAD//wAA//8AAP//AAD//wAA//8AAP//4OD//0BA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP+AAAD/UAAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD/YAAA/zAAAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA/zD///8AAAD/YAAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA/2D///8A////AP///wAAAP8QAAD/QAAA/0AAAP+AAAD/gAAA/4AAAP+AAAD/gAAA/4AAAP9AAAD/QAAA/xD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A//8AAP//AADAAwAAgAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAEAAMADAAD//wAA//8AAA</Image>
<Url type="text/html" method="GET" template="https://www.youtube.com/results"&gt;
<Param name="search_query" value="{searchTerms}"/>
<Param name="sp" value="CAMSAhAB"/>
</Url>
<SearchForm>https://www.youtube.com/</SearchForm&gt;
</SearchPlugin>

Save this file as YouTube-Search.xml and copy it to your ‘searchplugins’ directory in the Firefox profile directory.

This is not a real solution, as Google censorship is very open when it comes to Trump.

YouTube Ad Blocker and Annoyances Remover GreaseMonkey script updated

Blocks video ads too.

YouTube ad-blocker and annoyances remover script

This script removes ads, disables autoplay, mutes video, adds RSS support and displays all comments.

In this version, the script will

  • disable ads, including video ads. If a video ad is loaded, a new window will be opened until an ad-free video is loaded. You will have to manually close the other tabs. I am not sure how effective it is in blocking text ads, I use a ad-blocking HOSTS file and I don’t see ads most of the time.
  • pause all videos automatically. This is useful if you open multiple videos in different tabs and if they all start playing simultaneously, you will hear the biblical Tower of Babel.
  • turn off autoplay button
  • add an RSS link next to the channel name and in a LINK tag in the HEAD section of the HTML so that the browser can activate its RSS button (if available).
  • delete “recommended for you” videos
  • unhide description
  • display all comments
  • change profile link to videos page
  • change region to US. By default, YouTube pages defaults to India and all the results are tilted in favour of Indian Youtubers. The problems with the Indian Youtubers is that their videos have low-volume voice and high-volume music. By changing to US, the video results are mostly from English-speaking countries. They are not enamoured by the need to pepper their videos with loud interludes of the same copyright-free music.

The script supports Firefox-based browser up to version 36. Newer Firefox versions should use a UserAgent (UA) spoofer add-on. YouTube loads a lighter version of the YouTube page for older browsers. This script will require the GreaseMonkey add-on to be executed by the Firefox browser.

For non-YouTube pages, I have a more generic autoplay video autostopper script. It will also work on YouTube pages if the @exclude line is removed.


// ==UserScript==
// @name YouTubeAnnoyancesRemover
// @namespace com.vsubhash.js.youtube-annoyances-remover
// @description Disables ads, turns off autoload/autoplay, adds RSS link, deletes "recommended for you" videos, unhides description, displays all comments, changes profile link to videos page; changes region to US, displays video thumbnail image, and adds a link to the lighter version on Hooktube if video is not playable for codec reasons. Supports Firefox-based browser up to version 36. Newer versions should use a UserAgent (UA) spoofer add-on. YouTube loads a lighter version of the YouTube page for older browsers. This script will require the GreaseMonkey add-on to be executed by the Firefox browser. For embedded YouTube videos, use the script com.vsubhash.js.embedded-video-catcher.user.js.
// @include https://www.youtube.com/watch*
// @include https://www.youtube.com/channel*
// @include https://www.youtube.com/user*
// @version 2020.01
// @grant none
// ==/UserScript==
var sAdStyle = " { visibility: none!important; display: none!important; }";
var oDlDiv;
document.addEventListener("readystatechange", fixYouTubeAnnoyances, false);
try {
console.log("YAD: Page start");
window.setTimeout(pauseVideos, 2*1000);
window.setTimeout(pauseVideos, 4*1000);
window.setTimeout(pauseVideos, 6*1000);
} catch (e) { }
function fixYouTubeAnnoyances() {
if ((document.readyState == "interactive") || (document.readyState == "complete")) {
console.log("YAD: loaded");
try {
pauseVideos();
window.setTimeout(showDescription, 1*200);
window.setTimeout(closeVideoAds, 2*200);
window.setTimeout(changeRegion, 3*200);
window.setTimeout(addRssButton, 1*1000);
window.setTimeout(changeProfileLink, 2*1000);
window.setTimeout(pauseVideos, 3*1000);
window.setTimeout(removeRecommendedForYouAds, 4*1000);
window.setTimeout(disableAndHideAdContainers, 5*1000);
window.setTimeout(disableAutoPlay, 6*1000);
window.setTimeout(addVideoDownloadList, 7*1000);
window.setTimeout(loadAllComments, 15*1000);
window.setTimeout(removeRecommendedForYouAds, 16*1000);
} catch (e) {
console.error("YAD Error: " + e);
}
}
}
function addRssButton() {
console.log("YAD: addRssButton")
var oLink, oLinkEl, oChannelTag, oRssImg, oRssLink, sChannel, sChannelName, sUserName, sFeedUrl;
// Android 1.6
oLink = document.querySelector("div.tv span.gmb a");
oChannelTag = document.querySelector("div.tv span.gmb a span");
if (oLink == null) {
// Android 3+
oLink = document.querySelector("a.slim-owner-icon-and-title");
oChannelTag = document.querySelector("a.slim-owner-icon-and-title div h3");
}
if (oLink == null) {
// Android 46
oLink = document.querySelector("div.yt-user-info a");
oChannelTag = document.querySelector("div.yt-user-info a");
}
if (oLink == null) {
// Android 60
oLink = document.querySelector("div#owner-container *#owner-name a");
oChannelTag = document.querySelector("div#owner-container *#owner-name a");
}
if ((oLink ==null) || (oChannelTag == null)) { return; } else {
console.log("YAD: Channel name found.");
sChannelName = oChannelTag.textContent;
sChannelName = sChannelName.replace(/^\s+|\s+$/g, '');
console.log("YAD: Channel link found.");
if (oLink.getAttribute("href").indexOf("/channel/") == 0) {
sChannel = oLink.getAttribute("href").substr("/channel/".length);
sFeedUrl = "https://www.youtube.com/feeds/videos.xml?channel_id=&quot; + sChannel;
console.log("YAD: RSS ~ " + sChannelName + " = " + sFeedUrl);
} else if (oLink.getAttribute("href").indexOf("/user/") == 0) {
sUserName = oLink.getAttribute("href").substr("/user/".length);
sFeedUrl = "https://www.youtube.com/feeds/videos.xml?user=&quot; + sUserName;
console.log("YAD: RSS ~ " + sChannelName + " = " + sFeedUrl);
} else { return; }
oLinkEl = document.createElement("link");
oLinkEl.setAttribute("rel", "alternate");
oLinkEl.setAttribute("title", sChannelName);
oLinkEl.setAttribute("type", "application/rss+xml");
oLinkEl.setAttribute("href", sFeedUrl);
document.getElementsByTagName("head")[0].appendChild(oLinkEl);
oRssImg = document.createElement("img");
oRssImg.setAttribute("style", "margin: auto 1em; ");
oRssImg.setAttribute("alt", "RSS");
oRssImg.setAttribute("src", "https://www.google.com/images/rss.png&quot;);
oRssLink = document.createElement("a");
oRssLink.setAttribute("id", "mvytRssFeedLink");
oRssLink.setAttribute("href", sFeedUrl);
oRssLink.setAttribute("title", "RSS feed link for this channel");
oRssLink.setAttribute("style", "text-decoration: none; border-style: none; ");
oRssLink.appendChild(oRssImg);
if (document.getElementById("mvytRssFeedLink") == null) {
oChannelTag.insertAdjacentHTML('afterend', oRssLink.outerHTML);
}
}
}
function pauseVideos() {
console.log("YAD: Pausing videos");
try {
var oVideoEls = document.getElementsByTagName("video");
for (var i = 0; i < oVideoEls.length; i++) {
oVideoEls[i].pause();
oVideoEls[i].muted = true;
if (oVideoEls[i].src.indexOf("pltype=adhost") > -1) {
console.log("YAD: Video ad found… closing tab");
window.open(location.href, '_blank');
window.close();
}
console.log("YAD: Pausing video " + (i+1));
if (!oVideoEls[i].paused) {
oVideoEls[i].pause();
}
//oVideoEls[i].volume = 0.6; // custom controls do not update
oVideoEls[i].muted = true;
oVideoEls[i].removeAttribute("autoplay");
oVideoEls[i].removeAttribute("loop");
oVideoEls[i].removeAttribute("controls");
oVideoEls[i].setAttribute("preload", "none");
oVideoEls[i].pause();
}
var oButtons = document.getElementsByTagName("button");
for (var i = 0; i < oButtons.length; i++) {
if (oButtons[i].className) {
if (oButtons[i].className.indexOf("ytp-mute-button") > -1) {
console.log("YAD: Mute button " + oButtons[i].className);
oButtons[i].click();
oButtons[i].click();
}
}
}
} catch (e) {
console.error("YAD: Error – " + e);
}
}
function showDescription() {
console.log("YAD: Finding description…");
if (document.getElementById("action-panel-details") != null) {
document.getElementById("action-panel-details").className = "action-panel-content yt-uix-expander yt-card yt-card-has-padding";
}
console.log("YAD: Description unhidden.");
}
function closeVideoAds() {
console.log("YAD: Detecting video ads…");
if ((document.getElementsByClassName("videoAdUiTopButtons").length > 0) || (document.getElementsByClassName("videoAdUi").length > 0)) {
console.log("YAD: Video ad found");
window.open(location.href, '_blank');
window.close();
} else {
console.log("YAD: No video ad");
}
}
function disableAutoPlay() {
var oEl = document.getElementById("autoplay-checkbox");
if (oEl == null) {
console.log("YAD: Did not find autoplay button.");
} else if (oEl.hasAttribute("checked")) {
console.log("YAD: Disabling autoplay…");
oEl.click();
} else {
console.log("YAD: Autoplay already disabled.");
}
}
function removeRecommendedForYouAds() {
console.log("YAD: Removing recommended videos");
var oRelatedColumn = document.getElementById("watch-related");
if (oRelatedColumn != null) {
var arRelatedVids = oRelatedColumn.getElementsByTagName("li");
var j = 0;
if (arRelatedVids.length > 0) {
for (var i = arRelatedVids.length-1; i > -1; i–) {
if (arRelatedVids[i].textContent.indexOf("Recommended for you") != -1) {
//console.log("YAD: Removing " + arRelatedVids[i].textContent);
arRelatedVids[i].parentNode.removeChild(arRelatedVids[i]);
++j;
}
}
}
console.log("YAD: Removed " + j + " recommended videos");
}
oRelatedColumn = document.getElementById("watch7-sidebar-modules");
if (oRelatedColumn != null) {
var arRelatedVids = oRelatedColumn.getElementsByClassName("watch-sidebar-section");
var j = 0;
if (arRelatedVids.length > 0) {
for (var i = arRelatedVids.length-1; i > -1; i–) {
if (arRelatedVids[i].textContent.indexOf("Recommended for you") != -1) {
//console.log("YAD: Removing " + arRelatedVids[i].textContent);
arRelatedVids[i].parentNode.removeChild(arRelatedVids[i]);
++j;
}
}
}
console.log("YADN: Removed " + j + " new recommended videos");
}
}
function disableAndHideAdContainers() {
console.log("YAD: Disabling/deleting ad containers…");
var arDivIds = ["AdSense", "watch7-sidebar-ads", "promotion-shelf", "live-chat-iframe", "invideo-overlay:7", ];
var arDivClasses = [ "adDisplay", "annotation", "html5-endscreen", "iv-promo", "video-ads", "videoAdUiBottomBar", "ytp-ad-module", "ytp-endscreen-content", "ytp-cards-button", "ytp-cards-teaser", "ytp-ad-overlay-container", "ytp-ad-overlay-slot", "ytp-ad-text-overlay", "ytp-ad-overlay-ad-info-button-container", "ytp-ad-hover-text-button", "ytp-ad-info-hover-text-button", "ytp-ad-overlay-text-image", "ytp-ad-overlay-text-image", "ytp-ad-image-overlay", "ytp-ad-overlay-close-container", "ytp-ad-overlay-close-button" ];
for (var i = 0; i < arDivIds.length; i++) {
var oDiv = document.getElementById(arDivIds[i]);
if (oDiv != null) {
oDiv.style.visibility = "hidden!important";
oDiv.style.display = "none!important";
oDiv.parentNode.removeChild(oDiv);
console.log("YAD: Removed " + arDivIds[i] + " by ID");
} else {
console.log("YAD: Not found: " + arDivIds[i] + " by ID");
}
sAdStyle = "#" + arDivIds[i] + ((i==0)?" ":" , ") + sAdStyle;
}
for (var i = 0; i < arDivClasses.length; i++) {
var oDivs = document.getElementsByClassName(arDivClasses[i]);
if (oDivs != null) {
for (var j = 0; j < oDivs.length; j++) {
oDivs[j].style.visibility = "hidden!important";
oDivs[j].style.display = "none!important";
oDivs[j].parentNode.removeChild(oDivs[j]);
}
} else {
console.log("YAD: Not found: " + oDivs[j] + " by ID");
}
sAdStyle = "*." + arDivClasses[i] + " , " + sAdStyle;
}
document.getElementsByTagName("head")[0].innerHTML = document.getElementsByTagName("head")[0].innerHTML + "\n<style>" + sAdStyle + "\n</style>";
}
function changeRegion() {
var oLangButton = document.getElementById("yt-picker-country-button");
if (oLangButton != null) {
if (oLangButton.textContent.indexOf("United States") == -1) {
oLangButton.click();
window.setTimeout(
function() {
var arRegions = document.getElementsByClassName("yt-picker-item");
for (var i = 0; i < arRegions.length; i++) {
if (arRegions[i].textContent.indexOf("United States") > -1) {
arRegions[i].click();
break;
}
}
}, 3*1000);
}
}
}
function changeProfileLink() {
console.log("YAD: Changing profile link")
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/&quot;.length) == "https://www.youtube.com/channel/&quot;) {
oAnchors[j].href = oAnchors[j].href + "/videos";
oLatestVideosLink = document.createElement("a");
oLatestVideosLink.setAttribute("style", "background-image: url(https://s.ytimg.com/yts/imgbin/www-hitchhiker-vflYQU35a.png); width: 17px; height: 17px; background-position: -94px -472px; border-style: none; margin: 0; padding: 0; ");
oLatestVideosLink.setAttribute("id", "MvPopularLink");
oLatestVideosLink.setAttribute("href", oAnchors[j].href + "?view=0&sort=p&flow=grid");
oAnchors[j].insertAdjacentHTML("afterend", oLatestVideosLink.outerHTML);
bFound = true;
break;
}
}
if (bFound) { break; }
}
}
}
}
}
var iLoadAllCommentsTimeout = 0;
function loadAllComments() {
if (iLoadAllCommentsTimeout > 0) {
window.clearTimeout(iLoadAllCommentsTimeout);
}
var oDiv = document.getElementById("watch-discussion");
if (oDiv == null) { return; }
var oButtons = oDiv.getElementsByClassName("comment-section-renderer-paginator");
if (oButtons != null) {
console.log("YAD: Comments");
if (oButtons[0] != null) {
oButtons[0].click();
iLoadAllCommentsTimeout = window.setTimeout(loadAllComments, 20*1000);
}
}
}
function parseYTPlayer() {
console.log("YAD: Inside parser" );
console.log("YAD: Title" + ytplayer.config.args.title);
try {
if (document.getElementsByTagName("video")[0] && (document.getElementsByTagName("video")[0].pause)) {
document.getElementsByTagName("video")[0].pause();
}
} catch (e) {
window.alert(e);
}
var arFormatParams, arFormats, i, j, sURL, sQuality, sMimeType, sExtension;
var oDlList, oDlListItem;
oDlList = document.getElementById("mvyJsList");
if (oDlList == null) {
return;
}
oDlList.innerHTML += "<li><a href=\"" + location.href.replace("www.you", "www.hook") + "\" style=\"color: navy; font-weight: bold; \" target=\"_blank\">Load in HookTube</a></li>";
var oFormats = JSON.parse(ytplayer.config.args.player_response);
var arFormats = oFormats.streamingData.formats;
for (i = 0; i < arFormats.length; i++) {
oDlListItem = document.createElement("li");
var sFormat = arFormats[i].mimeType.split(';')[0];
if (arFormats[i].mimeType.split(';')[0] == "video/mp4") {
sFormat = "M";
} else if (arFormats[i].mimeType.split(';')[0] == "video/webm") {
sFormat = "W";
}
console.log("YAD: Format " + arFormats[i].quality + " – " + arFormats[i].qualityLabel + " – " + arFormats[i].mimeType.split(';')[0]);
oDlListItem.innerHTML = "<a title=\"" + arFormats[i].mimeType.replace(/\"/g,"") + "\" style=\"color: navy; font-weight: bold; \" target=\"_blank\" href=\"" + arFormats[i].url + "\">" + document.title.replace(" – YouTube", "") + " – " + arFormats[i].qualityLabel + " " + sFormat + "</a>";
oDlList.appendChild(oDlListItem);
}
}
function addCurrentPlayURL() {
var oList = document.getElementById("mvyJsList");
if (oList != null) {
if (document.getElementById("movie_player") != null) {
if (document.getElementById("movie_player").getElementsByTagName("video") != null) {
var oVideo = document.getElementById("movie_player").getElementsByTagName("video")[0];
if (oVideo.src) {
oList.innerHTML += "<li><a id=\"VidLinkUrl\" title=\"" + document.title + "\" download=\"" + document.title.replace(/\s+/ig, "-").replace(/-{2,}/ig, "-") + ".mp4\" style=\"color: navy; font-weight: bold; \" target=\"_blank\" href=\"" + oVideo.src + "\">" + document.title + "</a></li>";
console.log("YAD: Video URL = " + oVideo.src);
oVideo.addEventListener(
"loadeddata",
function() {
console.log("YAD: New video loaded");
document.getElementById("VidLinkUrl").setAttribute("href", document.getElementsByTagName("video")[0].src);
}, false);
} else {
console.log("YAD: Error in player");
}
}
} else {
console.log("YouTube detector: No player");
oList.innerHTML += "<li><a style=\"color: navy; font-weight: bold; \"href=\"" + location.href.replace("www.you", "www.hook") + "\" style=\"color: navy; font-weight: bold; \" target=\"_blank\">Load in HookTube</a></li>";
}
}
}
function addVideoDownloadList() {
console.log("Executing YouTube detector");
var i, n, oDlButtonEl, oVideosList;
oDlDiv = document.createElement("div");
oDlDiv.setAttribute("id", "mvyJsDiv");
oDlDiv.setAttribute("style", "background-color: orange!important; border: 2px dashed firebrick; font-size: 0.34cm!important; font-family: sans-serif!important; line-height: 0.4cm!important; margin: 1em auto; padding: 1em; min-height: 120px; ");
oDlDiv.innerHTML = "Download video from:";
var oTwitterImage = document.querySelector("html head meta[name='twitter:image']");
console.log("YAD: Twitter image" + oTwitterImage.getAttribute("content"));
if (oTwitterImage) {
oDlDiv.innerHTML += "<img src=\"" + oTwitterImage.getAttribute("content") + "\" style=\"max-width: 200px; float: right; margin: 1em auto 1em 1em; \" />\n";
} else if (window.URL) {
var oURL = new URL(location.href);
var sID = oURL.searchParams.get("v");
oDlDiv.innerHTML += "<img src=\"https://i.ytimg.com/vi/&quot; + sID + "/hqdefault.jpg\" style=\"max-width: 200px; float: right; margin: 1em auto 1em 1em; \" />";
}
oDlList = document.createElement("ul");
oDlList.setAttribute("style", "display: block; list-style: disc inside none; margin-left: 1em!important; ");
oDlList.setAttribute("id", "mvyJsList");
oDlDiv.appendChild(oDlList);
if (location.href.indexOf("youtube.com/watch") > -1) {
document.getElementById("watch-headline-title").appendChild(oDlDiv);
addCurrentPlayURL();
parseYTPlayer();
} else if (location.href.indexOf("youtube.com/embed/") > -1) {
// Use the script com.vsubhash.js.embedded-video-catcher
}
}

This browser user js is also available at
https://openuserjs.org/scripts/zomberi/YouTube_AdBlocker_N_Annoyances_Remover