Greasy Fork is available in English.

HideNotch

QuitarNotch

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name         HideNotch
// @match        *://*/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=youtube.com
// @run-at       document-end
// @version      0.0.2
// @description  QuitarNotch
// @namespace http://tampermonkey.net/
// ==/UserScript==

(function () {
    let meta, style, css, i;
    let timeOuts = [100, 200, 300, 500];
    let videos = document.getElementsByTagName('video');
    //********************************
    //*****       VIEWPORT       *****
    //********************************
    meta = document.createElement('meta');
    meta.name = 'viewport';
    meta.content = 'width=device-width, initial-scale=1.0, viewport-fit=cover, user-scalable=no';
    document.getElementsByTagName('head')[0].appendChild(meta);
    style = document.createElement('style');
    style.type = 'text/css';
    css = '.fillVideoCSS{ NavigationUI: hide!important; top: 0!important; left: 0!important; height: 100vh!important; width: 100vw!important; object-fit: fill!important;}';
    if (style.styleSheet) {
        style.styleSheet.cssText = css;
    } else {
        style.appendChild(document.createTextNode(css));
    }
    document.getElementsByTagName('head')[0].appendChild(style);
    //********************************
    //*****       LANDSCAPE      *****
    //********************************
    document.addEventListener('fullscreenchange', function () {
        if (document.fullscreenElement) {
            timeOuts.forEach(function (timeout) {
                setTimeout(function () {
                    for (i = 0; i < videos.length; i++) { if (videos[i] != null) { videos[i].classList.remove('fillVideoCSS'); } }
                    for (i = 0; i < videos.length; i++) { if (videos[i] !== null) { videos[i].classList.add('fillVideoCSS'); } }
                    if (document.getElementsByTagName('video')[0].videoWidth > document.getElementsByTagName('video')[0].videoHeight) {
                        screen.orientation.lock('landscape');
                    }
                }, timeout);
            });

        } else {
            for (i = 0; i < videos.length; i++) { if (videos[i] != null) { videos[i].classList.remove('fillVideoCSS'); } }
        }
        console.clear();
    });
    //********************************
    //*****         DISENO       *****
    //********************************
    let el;
    if (el = document.getElementById('speedbump')) el.remove();
    if (el = document.getElementById('views')) el.style.top = '0px';
})();