🎉 欢迎访问GreasyFork.Org 镜像站!本镜像站由公众号【爱吃馍】搭建,用于分享脚本。联系邮箱📮

Greasy fork 爱吃馍镜像

Nascondi lo scaffale YouTube Shorts nella pagina dei dettagli del video

Nasconde lo scaffale YouTube Shorts impostando il display su "nessuno" e l’altezza a zero

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

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

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

🚀 安装遇到问题?关注公众号获取帮助

公众号二维码

扫码关注【爱吃馍】

回复【脚本】获取最新教程和防失联地址

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

🚀 安装遇到问题?关注公众号获取帮助

公众号二维码

扫码关注【爱吃馍】

回复【脚本】获取最新教程和防失联地址

// ==UserScript==
// @name         Hide YouTube Shorts Shelf in the video detailed page
// @description  Hides the YouTube Shorts shelf by setting display to none and height to zero
// @name:ar      إخفاء رف YouTube Shorts في صفحة تفاصيل الفيديو
// @description:ar  يخفي رف YouTube Shorts عن طريق تعيين العرض إلى "لا شيء" والارتفاع إلى صفر
// @name:bg      Скриване на рафта YouTube Shorts на страницата с подробности за видеото
// @description:bg  Скрива рафта YouTube Shorts чрез задаване на дисплей на "няма" и височина на нула
// @name:cs      Skrýt poličku YouTube Shorts na stránce s podrobnostmi videa
// @description:cs  Skryje poličku YouTube Shorts nastavením zobrazení na "žádné" a výšky na nulu
// @name:da      Skjul YouTube Shorts-hylden på videoens detaljeside
// @description:da  Skjuler YouTube Shorts-hylden ved at sætte visning til "ingen" og højde til nul
// @name:de      YouTube Shorts-Regal auf der Videodetailseite ausblenden
// @description:de  Blendet das YouTube Shorts-Regal aus, indem die Anzeige auf "none" und die Höhe auf null gesetzt wird
// @name:el      Απόκρυψη του ραφιού YouTube Shorts στη σελίδα λεπτομερειών βίντεο
// @description:el  Αποκρύπτει το ράφι YouTube Shorts ορίζοντας την εμφάνιση σε "κανένα" και το ύψος σε μηδέν
// @name:en      Hide YouTube Shorts Shelf in the video detailed page
// @description:en  Hides the YouTube Shorts shelf by setting display to none and height to zero
// @name:eo      Kaŝi YouTube Shorts Breto en la Video-Detala Paĝo
// @description:eo  Kaŝas la YouTube Shorts-breton per agordo de montrado al "neniu" kaj alteco al nulo
// @name:es      Ocultar el estante de YouTube Shorts en la página de detalles del video
// @description:es  Oculta el estante de YouTube Shorts configurando la visualización a "ninguno" y la altura a cero
// @name:fi      Piilota YouTube Shorts -hylly videon yksityiskohtaisella sivulla
// @description:fi  Piilottaa YouTube Shorts -hyllyn asettamalla näytön arvoksi "ei mitään" ja korkeudeksi nolla
// @name:fr      Masquer l’étagère YouTube Shorts sur la page détaillée de la vidéo
// @description:fr  Masque l’étagère YouTube Shorts en définissant l’affichage sur "aucun" et la hauteur à zéro
// @name:fr-CA   Cacher l’étagère YouTube Shorts sur la page détaillée de la vidéo
// @description:fr-CA  Cache l’étagère YouTube Shorts en réglant l’affichage à "aucun" et la hauteur à zéro
// @name:he      הסתר את מדף YouTube Shorts בדף הפרטים של הסרטון
// @description:he  מסתיר את מדף YouTube Shorts על ידי הגדרת התצוגה ל"ללא" והגובה לאפס
// @name:hr      Sakrij policu YouTube Shorts na stranici s detaljima videa
// @description:hr  Sakriva policu YouTube Shorts postavljanjem prikaza na "nema" i visine na nulu
// @name:hu      YouTube Shorts polc elrejtése a videó részletes oldalán
// @description:hu  Elrejti a YouTube Shorts polcot a megjelenítés "nincs"-re és a magasság nullára állításával
// @name:id      Sembunyikan Rak YouTube Shorts di Halaman Detail Video
// @description:id  Menyembunyikan rak YouTube Shorts dengan mengatur tampilan ke "tidak ada" dan tinggi ke nol
// @name:it      Nascondi lo scaffale YouTube Shorts nella pagina dei dettagli del video
// @description:it  Nasconde lo scaffale YouTube Shorts impostando il display su "nessuno" e l’altezza a zero
// @name:ja      ビデオ詳細ページでYouTube Shortsシェルフを非表示
// @description:ja  YouTube Shortsシェルフをディスプレイを「なし」に、高さをゼロに設定して非表示にします
// @name:ka      YouTube Shorts-ის თაროს დამალვა ვიდეოს დეტალურ გვერდზე
// @description:ka  მალავს YouTube Shorts-ის თაროს ჩვენების "არაფერი"-ზე და სიმაღლის ნულზე დაყენებით
// @name:ko      비디오 상세 페이지에서 YouTube Shorts 선반 숨기기
// @description:ko  YouTube Shorts 선반을 디스플레이를 "없음"으로, 높이를 0으로 설정하여 숨깁니다
// @name:nb      Skjul YouTube Shorts-hylle på videoens detaljside
// @description:nb  Skjuler YouTube Shorts-hyllen ved å sette visning til "ingen" og høyde til null
// @name:nl      Verberg de YouTube Shorts-plank op de videodetailpagina
// @description:nl  Verbergt de YouTube Shorts-plank door de weergave op "geen" en de hoogte op nul te zetten
// @name:pl      Ukryj półkę YouTube Shorts na stronie szczegółów wideo
// @description:pl  Ukrywa półkę YouTube Shorts, ustawiając wyświetlanie na "brak" i wysokość na zero
// @name:pt-BR   Ocultar a prateleira de YouTube Shorts na página de detalhes do vídeo
// @description:pt-BR  Oculta a prateleira de YouTube Shorts definindo a exibição como "nenhum" e a altura como zero
// @name:ro      Ascunde raftul YouTube Shorts pe pagina detaliată a videoclipului
// @description:ro  Ascunde raftul YouTube Shorts setând afișajul la "niciunul" și înălțimea la zero
// @name:ru      Скрыть полку YouTube Shorts на странице с подробностями видео
// @description:ru  Скрывает полку YouTube Shorts, устанавливая отображение на "нет" и высоту на ноль
// @name:sk      Skryť poličku YouTube Shorts na stránke s podrobnosťami videa
// @description:sk  Skryje poličku YouTube Shorts nastavením zobrazenia na "žiadne" a výšky na nulu
// @name:sr      Сакриј полицу YouTube Shorts на страници са детаљима видеа
// @description:sr  Сакрива полицу YouTube Shorts постављањем приказа на "нема" и висине на нулу
// @name:sv      Dölj YouTube Shorts-hylla på videons detaljsida
// @description:sv  Döljer YouTube Shorts-hyllan genom att ställa in visning till "ingen" och höjd till noll
// @name:th      ซ่อนชั้นวาง YouTube Shorts ในหน้าสำหรับรายละเอียดวิดีโอ
// @description:th  ซ่อนชั้นวาง YouTube Shorts โดยตั้งค่าการแสดงผลเป็น "ไม่มี" และความสูงเป็นศูนย์
// @name:tr      Video detay sayfasında YouTube Shorts Rafını Gizle
// @description:tr  YouTube Shorts rafını, görüntüyü "yok" ve yüksekliği sıfır yaparak gizler
// @name:ug      YouTube Shorts تاختىسىنى ۋىدېئونىڭ تەپسىلىي بېتىدە يوشۇرۇش
// @description:ug  YouTube Shorts تاختىسىنى كۆرسىتىشنى "يوق" قىلىپ، ئېگىزلىكىنى نۆلگە تەڭشەپ يوشۇرىدۇ
// @name:uk      Приховати полицю YouTube Shorts на сторінці з деталями відео
// @description:uk  Приховує полицю YouTube Shorts, встановлюючи відображення на "немає" і висоту на нуль
// @name:vi      Ẩn kệ YouTube Shorts trên trang chi tiết video
// @description:vi  Ẩn kệ YouTube Shorts bằng cách đặt hiển thị thành "không" và chiều cao thành số không
// @name:zh      在视频详情页面隐藏YouTube Shorts
// @description:zh  通过将显示设置为“无”和高度设置为零来隐藏YouTube Shorts
// @name:zh-CN   在视频详情页面隐藏YouTube Shorts
// @description:zh-CN  通过将显示设置为“无”和高度设置为零来隐藏YouTube Shorts
// @name:zh-HK   在影片詳情頁面隱藏YouTube Shorts
// @description:zh-HK  通過將顯示設為「無」同高度設為零來隱藏YouTube Shorts
// @name:zh-SG   在视频详情页面隐藏YouTube Shorts
// @description:zh-SG  通过将显示设置为“无”和高度设置为零来隐藏YouTube Shorts
// @name:zh-TW   在影片詳細頁面隱藏YouTube Shorts
// @description:zh-TW  透過將顯示設為「無」並將高度設為零來隱藏YouTube Shorts
// @namespace    http://tampermonkey.net/
// @version      1.0.1.1
// @author       aspen138
// @match        *://www.youtube.com/*
// @grant        none
// @run-at       document-end
// @icon         https://www.youtube.com/favicon.ico
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    // Function to hide the Shorts shelf
    function hideShortsShelf() {
        // Select the Shorts shelf element
        const shortsShelf = document.querySelector('ytd-reel-shelf-renderer');

        if (shortsShelf) {
            // Apply styles to hide the element
            shortsShelf.style.setProperty('display', 'none', 'important');
            shortsShelf.style.setProperty('height', '0', 'important');
            console.log('YouTube Shorts shelf has been hidden.');
        }
    }

    // Initial attempt to hide the Shorts shelf
    hideShortsShelf();

    // Observe changes in the DOM to hide the Shorts shelf if it loads later
    const observer = new MutationObserver((mutations) => {
        for (let mutation of mutations) {
            if (mutation.addedNodes.length) {
                hideShortsShelf();
            }
        }
    });

    // Start observing the body for added nodes
    observer.observe(document.body, { childList: true, subtree: true });

})();