您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Skips video ads, auto-expands description, and redirects YouTube Shorts to normal player
// ==UserScript== // @name YouTube Enhancer: Skip Ads, Expand Description, Disable Shorts // @namespace http://tampermonkey.net/ // @version 1.0 // @description Skips video ads, auto-expands description, and redirects YouTube Shorts to normal player // @author Yousef Shamsaldeen // @match *://www.youtube.com/* // @icon https://www.youtube.com/s/desktop/6e2e38ae/img/favicon_144x144.png // @grant none // ==/UserScript== (function () { 'use strict'; const skipAds = () => { const skipBtn = document.querySelector('.ytp-ad-skip-button'); if (skipBtn) { skipBtn.click(); console.log("✅ Ad skipped"); } // Skip video ads (muted and skipped) const video = document.querySelector('video'); if (video && video.duration > 1 && video.currentSrc.includes("googlevideo.com")) { video.muted = true; video.currentTime = video.duration; console.log("✅ Skipping video ad"); } }; const expandDescription = () => { const moreBtn = document.querySelector('tp-yt-paper-button#more'); if (moreBtn && moreBtn.innerText.toLowerCase().includes("more")) { moreBtn.click(); console.log("✅ Expanded description"); } }; const redirectShorts = () => { const url = new URL(window.location.href); if (url.pathname.startsWith("/shorts/")) { const videoId = url.pathname.split("/")[2]; if (videoId) { const newUrl = `https://www.youtube.com/watch?v=${videoId}`; window.location.replace(newUrl); console.log("✅ Redirected from Shorts"); } } }; const observer = new MutationObserver(() => { skipAds(); expandDescription(); }); redirectShorts(); // Observe DOM for dynamic changes observer.observe(document.body, { childList: true, subtree: true }); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址