您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Hides the autoplay channel trailer on YouTube channel pages.
// ==UserScript== // @name YouTube - Hide Channel Trailer // @description Hides the autoplay channel trailer on YouTube channel pages. // @match https://www.youtube.com/* // @grant none // @version 0.0.1.20250625215806 // @namespace https://gf.qytechs.cn/users/1435046 // ==/UserScript== (function() { 'use strict'; const trailerSelector = 'ytd-channel-video-player-renderer'; function hideTrailer() { const trailer = document.querySelector(trailerSelector); if (trailer) { trailer.style.setProperty('display', 'none', 'important'); const video = trailer.querySelector('video'); if (video) { video.pause(); video.muted = true; } } } // Use MutationObserver to detect dynamic content changes const observer = new MutationObserver(() => { hideTrailer(); }); observer.observe(document.body, { childList: true, subtree: true }); // Listen for YouTube's own navigation event window.addEventListener('yt-navigate-finish', () => { setTimeout(hideTrailer, 500); // Delay gives time for the page to load the trailer }); // Initial run (e.g., first load or hard refresh) window.addEventListener('DOMContentLoaded', () => { setTimeout(hideTrailer, 500); }); console.log('[yt-no-channel-trailer] Initialized'); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址