YouTube Subs List Filter

Hide your subs that have no uploads, no more hunting! Also links you directly to the videos page. Also cuts out polymer videos that you have already watched or watch-latered.

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

You will need to install an extension such as Tampermonkey to install this script.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

You will need to install an extension such as Tampermonkey to install this script.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         YouTube Subs List Filter
// @namespace    http://ejew.in/
// @version      0.3
// @description  Hide your subs that have no uploads, no more hunting! Also links you directly to the videos page. Also cuts out polymer videos that you have already watched or watch-latered.
// @author       EntranceJew
// @match        https://www.youtube.com/*
// @grant        none
// ==/UserScript==

(function() {
    var checkExist = setInterval(function() {
        var i = 0;
        var subsContainer = document.querySelector('a.yt-simple-endpoint[href="/feed/channels"]');
        if( subsContainer ){
            var ourSubs = subsContainer.parentElement.parentElement.nextElementSibling;
            // hide things we don't care about
            var subs = ourSubs.querySelectorAll(".guide-entry-count[hidden]");

            if( subs.length ){
                for (i = 0; i < subs.length; ++i) {
                    subs[i].parentNode.parentNode.hidden = true;
                }
            }

            var links = ourSubs.querySelectorAll('ytd-guide-entry-renderer>a[href^="/channel/"]:not([name$="/videos"])');

            if( links.length ){
                for (i = 0; i < links.length; ++i) {
                    links[i].href += "/videos";
                }
            }
        }

        var videos = document.querySelectorAll('.ytd-shelf-renderer ytd-thumbnail-overlay-resume-playback-renderer .ytd-thumbnail-overlay-resume-playback-renderer[style="width: 100%;"]');

        if( videos.length ){
            for (i = 0; i < videos.length; ++i) {
                videos[i].parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.hidden = true;
            }
        }

        var added = document.querySelectorAll('.ytd-shelf-renderer ytd-thumbnail-overlay-toggle-button-renderer[aria-label="Added"]');

        if( added.length ){
            for(i = 0; i < added.length; ++i) {
                added[i].parentNode.parentNode.parentNode.parentNode.parentNode.hidden = true;
            }
        }
    }, 100); // check every 100ms
})();