How to prevent YouTube from showing already watched videos?












11















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










share|improve this question















migrated from superuser.com yesterday


This question came from our site for computer enthusiasts and power users.



















  • Showing where?

    – Jan Doggen
    yesterday






  • 1





    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
    23 hours ago
















11















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










share|improve this question















migrated from superuser.com yesterday


This question came from our site for computer enthusiasts and power users.



















  • Showing where?

    – Jan Doggen
    yesterday






  • 1





    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
    23 hours ago














11












11








11


7






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










share|improve this question
















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







youtube






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited yesterday









user0

9,84171533




9,84171533










asked yesterday









E. SommerE. Sommer

1587




1587




migrated from superuser.com yesterday


This question came from our site for computer enthusiasts and power users.









migrated from superuser.com yesterday


This question came from our site for computer enthusiasts and power users.















  • Showing where?

    – Jan Doggen
    yesterday






  • 1





    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
    23 hours ago



















  • Showing where?

    – Jan Doggen
    yesterday






  • 1





    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
    23 hours ago

















Showing where?

– Jan Doggen
yesterday





Showing where?

– Jan Doggen
yesterday




1




1





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
23 hours ago





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
23 hours ago










2 Answers
2






active

oldest

votes


















11














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:




  • Chrome extension: Subscriptions Grid For YouTube™

  • Chrome extension: YouTweak for YouTube™

  • Chrome extension: YouTube Watched

  • Chrome extension: Better Tube

  • Chrome extension: Better Subscriptions for YouTube™ - (@Ashley)

  • JS UserScript: YouTube: Hide Watched Videos




// ==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();





share|improve this answer





















  • 3





    That's a shame. I'm getting the same ~dozen music videos all the time but completely blocking them is overkill.

    – JollyJoker
    yesterday











  • oh nice, you updated with a userscript! :-)

    – Aaron F
    8 hours ago



















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.






share|improve this answer








New contributor




Ashley is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "34"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    noCode: true, onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fwebapps.stackexchange.com%2fquestions%2f126729%2fhow-to-prevent-youtube-from-showing-already-watched-videos%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    11














    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:




    • Chrome extension: Subscriptions Grid For YouTube™

    • Chrome extension: YouTweak for YouTube™

    • Chrome extension: YouTube Watched

    • Chrome extension: Better Tube

    • Chrome extension: Better Subscriptions for YouTube™ - (@Ashley)

    • JS UserScript: YouTube: Hide Watched Videos




    // ==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();





    share|improve this answer





















    • 3





      That's a shame. I'm getting the same ~dozen music videos all the time but completely blocking them is overkill.

      – JollyJoker
      yesterday











    • oh nice, you updated with a userscript! :-)

      – Aaron F
      8 hours ago
















    11














    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:




    • Chrome extension: Subscriptions Grid For YouTube™

    • Chrome extension: YouTweak for YouTube™

    • Chrome extension: YouTube Watched

    • Chrome extension: Better Tube

    • Chrome extension: Better Subscriptions for YouTube™ - (@Ashley)

    • JS UserScript: YouTube: Hide Watched Videos




    // ==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();





    share|improve this answer





















    • 3





      That's a shame. I'm getting the same ~dozen music videos all the time but completely blocking them is overkill.

      – JollyJoker
      yesterday











    • oh nice, you updated with a userscript! :-)

      – Aaron F
      8 hours ago














    11












    11








    11







    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:




    • Chrome extension: Subscriptions Grid For YouTube™

    • Chrome extension: YouTweak for YouTube™

    • Chrome extension: YouTube Watched

    • Chrome extension: Better Tube

    • Chrome extension: Better Subscriptions for YouTube™ - (@Ashley)

    • JS UserScript: YouTube: Hide Watched Videos




    // ==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();





    share|improve this answer















    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:




    • Chrome extension: Subscriptions Grid For YouTube™

    • Chrome extension: YouTweak for YouTube™

    • Chrome extension: YouTube Watched

    • Chrome extension: Better Tube

    • Chrome extension: Better Subscriptions for YouTube™ - (@Ashley)

    • JS UserScript: YouTube: Hide Watched Videos




    // ==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();






    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited 5 hours ago

























    answered yesterday









    user0user0

    9,84171533




    9,84171533








    • 3





      That's a shame. I'm getting the same ~dozen music videos all the time but completely blocking them is overkill.

      – JollyJoker
      yesterday











    • oh nice, you updated with a userscript! :-)

      – Aaron F
      8 hours ago














    • 3





      That's a shame. I'm getting the same ~dozen music videos all the time but completely blocking them is overkill.

      – JollyJoker
      yesterday











    • oh nice, you updated with a userscript! :-)

      – Aaron F
      8 hours ago








    3




    3





    That's a shame. I'm getting the same ~dozen music videos all the time but completely blocking them is overkill.

    – JollyJoker
    yesterday





    That's a shame. I'm getting the same ~dozen music videos all the time but completely blocking them is overkill.

    – JollyJoker
    yesterday













    oh nice, you updated with a userscript! :-)

    – Aaron F
    8 hours ago





    oh nice, you updated with a userscript! :-)

    – Aaron F
    8 hours ago













    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.






    share|improve this answer








    New contributor




    Ashley is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.

























      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.






      share|improve this answer








      New contributor




      Ashley is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.























        4












        4








        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.






        share|improve this answer








        New contributor




        Ashley is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.










        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.







        share|improve this answer








        New contributor




        Ashley is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        share|improve this answer



        share|improve this answer






        New contributor




        Ashley is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        answered yesterday









        AshleyAshley

        414




        414




        New contributor




        Ashley is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.





        New contributor





        Ashley is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






        Ashley is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Web Applications Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fwebapps.stackexchange.com%2fquestions%2f126729%2fhow-to-prevent-youtube-from-showing-already-watched-videos%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            He _____ here since 1970 . Answer needed [closed]What does “since he was so high” mean?Meaning of “catch birds for”?How do I ensure “since” takes the meaning I want?“Who cares here” meaningWhat does “right round toward” mean?the time tense (had now been detected)What does the phrase “ring around the roses” mean here?Correct usage of “visited upon”Meaning of “foiled rail sabotage bid”It was the third time I had gone to Rome or It is the third time I had been to Rome

            Bunad

            Færeyskur hestur Heimild | Tengill | Tilvísanir | LeiðsagnarvalRossið - síða um færeyska hrossið á færeyskuGott ár hjá færeyska hestinum