Learn how to remove or disable those stupid YouTube end cards that don't allow you to see the end of the video.

How to remove or disable YouTube end cards

How many times those stupid recommendation cards have covered an important part at the end of the video? It happened to me more than once and sincerely, I'm getting tired of it because there's no option on YouTube to disable them, you are forced to see them under any circumstance. In this article, we'll explain to you 2 useful approaches that you can use to remove the cards that appear at the end of every YouTube video permanently or whenever you want.

A. Removing once

If all that you need is to remove the card once, for example, if you are trying to create a screenshot of a particular scene in the video that is covered with the cards, you can inject some JavaScript to remove them from the document. To do this, we need to open the Developer Tools of the browser, in this case, we are going to work in Google Chrome. To open the dev tools press F12 or alternatively go to Settings > More Tools > Developer Tools () and a docked area will appear in the browser. In this new area, go to the Console tab and inject the following code that will select all of those card elements identified with the CSS selector .ytp-ce-element and will remove all of them:

document.querySelectorAll(".ytp-ce-element").forEach((el) => el.remove());

Just paste the given code in the terminal like this and press enter:

YouTube Videos Cards at the end

After injecting the code, the cards will disappear from the current video:

Remove Cards at the end of the videos YouTube

Great!

B. Removing permanently

In case that you want to remove permanently the cards from appearing in every YouTube video that you see, you will need to follow some extra steps. The best solution that exists nowadays is to automatize what we did in the first step through an extension that can be installed in the browser. This extension is uBlock Origin, an efficient blocker that goes easy on CPU and memory. uBlock Origin is not an "ad blocker", but a wide-spectrum content blocker with CPU and memory efficiency as a primary feature. It features as well:

  • uBlock Origin filter lists
  • EasyList (ads)
  • EasyPrivacy (tracking)
  • Peter Lowe’s Ad server list (ads and tracking)
  • Online Malicious URL Blocklist

You can install easily this extension from the official website in the browser here:

Install uBlock Origin Extension

After installing it, you need to add a new filter that will analyze the YouTube domain every time you visit it and will block the card elements from appearing. Visit the YouTube website (youtube.com) and open the dashboard of uBlock Origin:

uBlock Dashboard

Then go to the My filters tab and register the following rule in the text editor:

! www.youtube.com
  ##.ytp-ce-element

Then click on Apply changes:

Apply Changes uBlock Origin

and close the tab! Now if you visit any video on YouTube that shows those cards, they won't appear anymore:

YouTube remove End Cards Automatically

Happy coding ❤️!


Interested in programming since he was 14 years old, Carlos is a self-taught programmer and founder and author of most of the articles at Our Code World.

Become a more social person

Sponsors