loader image

How to block YouTube Shorts

What makes us different from other similar websites? Forums Tech How to block YouTube Shorts

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #5662
    thumbtak
    Keymaster

    Desktop:

    1. Install the extension for your browser. [Firefox] [Chrome]
    2. Set the following option for the plugin.

    Android:

    1. Install Vanced.
    2. Setting => Vanced settings => layout => disable YouTube stories
    #5760
    thumbtak
    Keymaster

    I found these settings to work better.

    • This reply was modified 2 years, 11 months ago by thumbtak. Reason: Filters Updated
    #6793
    thumbtak
    Keymaster

    Here is a better way to do it.

    1. Install Firefox or Chrome.
    2. Install Greasemonkey for Firefox or Tampermonkey for Chrome.
    3. Install this script.
    4. Goto Youtube.com.
    5. Click button.
    6. You should now see that all of the shorts videos have been removed. If you want them back, click on button.
    #6959
    thumbtak
    Keymaster

    Updated YouTube Shorts script

    // ==UserScript==
    // @name         Hide youtube #shorts
    // @namespace    https://gist.github.com/danieloliveira117/8d129abcc5d744890c9bd55f1c122472
    // @version      1.4
    // @description  Remove youtube shorts from subscriptions (Only in grid view)
    // @author       danieloliveira117
    // @match        https://*.youtube.com/feed/subscriptions
    // @grant        none
    // ==/UserScript==
    
    (function() {
        'use strict';
    
        const style = document.createElement('style');
        style.type = 'text/css';
        style.innerHTML = '.display_as_contents { display: contents !important; }';
        document.getElementsByTagName('head')[0].appendChild(style);
    
        function removeShorts() {
            let count = 0;
    
             // Clear blank spaces when deleting shorts
             document.querySelectorAll('ytd-rich-grid-row:not(.display_as_contents)').forEach(t => {
                if (t) {
                    t.classList.add("display_as_contents");
    
                    if (t.childElementCount) {
                        t.firstElementChild.classList.add("display_as_contents");
                    }
                }
            });
    
            document.querySelectorAll('ytd-thumbnail-overlay-time-status-renderer[overlay-style="SHORTS"]').forEach(t => {
                if (t) {
                    count++;
                    const elem = t.closest('ytd-rich-item-renderer');
    
                    if (elem) {
                        elem.remove();
                    }
                }
            });
    
            if (count) {
                console.log('Removed ' + count + ' shorts');
            }
        }
    
        const observer = new MutationObserver(removeShorts);
        observer.observe(document.querySelector('#page-manager'), { childList:true, subtree:true });
    })();
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
TAKs Shack