19

Is there a way to prevent YouTube from showing videos already watched in the list of suggested videos?

1
  • 2
    A quick glance at the HTML makes me think that it shouldn't be too hard to do. You basically want to set display: none on any <ytd-compact-video-renderer> element that contains a child element #progress. You won't be able to do that in CSS, but a Tampermonkey script should be simple enough. I'll have a go later and write an answer...
    – Aaron F
    Mar 25, 2019 at 17:03

5 Answers 5

14

Currently, there is no treat/workaround to do so. Apart from manually block them one by one, there are no scalable solutions.

0

But there are extensions which can do so like:


// ==UserScript==
// @version        1.1.1
// @name           Hide watched videos on YouTube
// @namespace      https://gist.github.com/xPaw/6324624
// @match          https://www.youtube.com/*
// @updateURL      https://gist.github.com/xPaw/6324624/raw/YoutubeHideWatched.user.js
// @downloadURL    https://gist.github.com/xPaw/6324624/raw/YoutubeHideWatched.user.js
// @grant          none
// ==/UserScript==

const app = document.querySelector( 'ytd-app' );

function HideVideos( a )
{
    app.querySelectorAll( 'ytd-thumbnail-overlay-resume-playback-renderer:not([data-hidden="true"])' ).forEach( element =>
    {
        element.dataset.hidden = true;

        while( ( element = element.parentNode ).tagName.toLowerCase() !== 'ytd-item-section-renderer' )
        {
            // Find the container element for this video
        }

        element.hidden = true;
    } );
}

function ProcessPage()
{
    if( !window.location.pathname.startsWith( '/feed/subscriptions' ) )
    {
        return;
    }

    const list = app.querySelector( 'ytd-section-list-renderer' );

    if( list.dataset.hooked )
    {
        return;
    }

    list.dataset.hooked = true;
    list.addEventListener( 'yt-next-continuation-data-updated', HideVideos );

    // TODO: Find an event to fix this
    new MutationObserver( HideVideos ).observe( list, { childList: true, subtree: true } );
}

app.addEventListener( 'yt-navigate-finish', ProcessPage );

ProcessPage();
4
  • 3
    That's a shame. I'm getting the same ~dozen music videos all the time but completely blocking them is overkill.
    – JollyJoker
    Mar 25, 2019 at 15:27
  • 1
    oh nice, you updated with a userscript! :-)
    – Aaron F
    Mar 26, 2019 at 8:34
  • Some don't work, but this is what I was looking for. Tks
    – DGaleano
    Nov 18, 2019 at 19:45
  • Of the Chrome extensions "Better Subscriptions for YouTube" is the only one that still exists / has recent updates. It worked for me, though, and there are also >15 other plugins in the "related" list on the plugins. Oct 30, 2022 at 8:30
4

AFAIK, there's no way to do this on YouTube itself, but I use a Chrome extension (Better Subscriptions for YouTube) that lets you hide watched videos from your subscriptions tab.

3

I have developed a professional add-on/user script specialy for hiding watched videos on YouTube: watched videos hider addon for Firefox https://addons.mozilla.org/en-US/firefox/addon/youtube-watched-videos-hider/

for chrome and other browsers you need to use the user script limited edition, becouse she will hide also your YouTube songs play list but the addon have option to solve that, you can just stop the script when you want to listen to prewatched song

Firstly you need to install the user script manager

https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo?hl=en https://addons.opera.com/en/extensions/details/tampermonkey-beta/

Then install the user script from this GitHub link, it should automatically installed with one click , otherwise you need to copy the script and past it in the user script manager(like temper monkey)

https://github.com/ibtisammidlet/youtube-watched-videos-hider/raw/master/youtube-watched-videos-hider.user.js

4
  • Okay thanks for head up, I have improved my answare now. Mar 19, 2020 at 23:17
  • Why would that plugin need my Youtube ID for anything? Somehow I can only think of sinister reasons. It shouldn't be necessary for detecting watched videos. Watched video thumbnails have a timeline overlayed on them which you can detect.
    – Zom-B
    Mar 14, 2021 at 17:07
  • Thanks--this hides them (tested in Chrome) but doesn't prevent auto-play from playing them. (Which of course would be asking for a lot). As expected [though not desired per se], it hides partially-watched videos and sometimes makes YouTube a little "glitchy" in loading video thumbnails
    – velkoon
    Mar 26, 2021 at 17:35
  • Your plugin still shows watched videos by Shift+n (next video) and in playlist in full mode (left upper corner) Jun 2, 2021 at 20:33
1

This is by far the best solution I have for the problem.

Install uBlock on your Firefox or Chrome and add the following filter rule on Options -> My Filters.

! removes watched video items
www.youtube.com###dismissible:has(#progress.ytd-thumbnail-overlay-resume-playback-renderer)

Note that it also blocks watched videos across the website, on the search page, uploaded by a user page. If you need to block for example only on the right bar suggestion area when you're on a video, add a path filter in the filter rule.

www.youtube.com##:matches-path(/^/watch/) #dismissible:has(#progress.ytd-thumbnail-overlay-resume-playback-renderer)
0

You can use an extension like YouTube Hider

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.