您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Disable and hide suggested video autoplay on YouTube
// ==UserScript== // @name Youtube: disable suggested autoplay // @include https://www.youtube.com/* // @description Disable and hide suggested video autoplay on YouTube // @version 1.0 // @author wOxxOm // @namespace wOxxOm.scripts // @license MIT License // @run-at document-start // ==/UserScript== /* jshint lastsemic:true, multistr:true, laxbreak:true, -W030, -W041, -W084 */ let next, cancel; document.addEventListener('DOMContentLoaded', processPage); window.addEventListener('yt-navigate-finish', processPage); window.addEventListener('spfdone', processPage); function processPage(e) { next = document.querySelector('.ytp-upnext'); cancel = document.querySelector('.ytp-upnext-cancel-button'); if (!next) return; if (getComputedStyle(next).display != 'none') cancelNext(); else new MutationObserver((_, ob) => { cancelNext(); ob.disconnect(); }) .observe(next, {attributes: true, attributeFilter: ['style']}); } function cancelNext() { cancel && cancel.click(); next.remove(); console.log('Canceled suggested video autoplay'); }
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址