How to prevent YouTube from showing already watched videos?












8















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


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



















  • Showing where?

    – Jan Doggen
    13 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
    7 hours ago
















8















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


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



















  • Showing where?

    – Jan Doggen
    13 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
    7 hours ago














8












8








8


5






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









user0

9,80171432




9,80171432










asked 13 hours ago









E. SommerE. Sommer

1435




1435




migrated from superuser.com 13 hours ago


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









migrated from superuser.com 13 hours ago


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















  • Showing where?

    – Jan Doggen
    13 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
    7 hours ago



















  • Showing where?

    – Jan Doggen
    13 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
    7 hours ago

















Showing where?

– Jan Doggen
13 hours ago





Showing where?

– Jan Doggen
13 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
7 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
7 hours ago










2 Answers
2






active

oldest

votes


















9














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:




  • Subscriptions Grid For YouTube™

  • YouTweak for YouTube™

  • YouTube: Hide Watched Videos

  • YouTube Watched

  • Better Tube


  • Better Subscriptions for YouTube™ - (@Ashley)




// ==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
    9 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









    9














    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:




    • Subscriptions Grid For YouTube™

    • YouTweak for YouTube™

    • YouTube: Hide Watched Videos

    • YouTube Watched

    • Better Tube


    • Better Subscriptions for YouTube™ - (@Ashley)




    // ==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
      9 hours ago
















    9














    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:




    • Subscriptions Grid For YouTube™

    • YouTweak for YouTube™

    • YouTube: Hide Watched Videos

    • YouTube Watched

    • Better Tube


    • Better Subscriptions for YouTube™ - (@Ashley)




    // ==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
      9 hours ago














    9












    9








    9







    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:




    • Subscriptions Grid For YouTube™

    • YouTweak for YouTube™

    • YouTube: Hide Watched Videos

    • YouTube Watched

    • Better Tube


    • Better Subscriptions for YouTube™ - (@Ashley)




    // ==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:




    • Subscriptions Grid For YouTube™

    • YouTweak for YouTube™

    • YouTube: Hide Watched Videos

    • YouTube Watched

    • Better Tube


    • Better Subscriptions for YouTube™ - (@Ashley)




    // ==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 7 hours ago

























    answered 13 hours ago









    user0user0

    9,80171432




    9,80171432








    • 3





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

      – JollyJoker
      9 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
      9 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
    9 hours ago





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

    – JollyJoker
    9 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 8 hours ago









        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

            How to make a Squid Proxy server?

            第一次世界大戦

            Touch on Surface Book