您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Prevents YouTube videos from autoplaying and allows manual playback control.
// ==UserScript== // @name YouTube Autoplay Stopper For IOS // @namespace assistant-scripts // @version 1.0 // @description Prevents YouTube videos from autoplaying and allows manual playback control. // @author Assistant // @match https://www.youtube.com/* // @run-at document-start // @grant none // ==/UserScript== (function() { // Function to pause videos and prevent autoplay function stopVideoAutoplay(video) { video.pause(); video.autoplay = false; // Ensure video stays paused even if something tries to restart it video.addEventListener('play', function pauseOnPlay() { video.pause(); // Remove the listener after first use to allow manual play video.removeEventListener('play', pauseOnPlay); }); } // MutationObserver to catch video elements as they’re added const observer = new MutationObserver((mutations) => { const video = document.querySelector('video'); if (video && !video.dataset.autoplayDisabled) { stopVideoAutoplay(video); video.dataset.autoplayDisabled = 'true'; // Mark as processed } }); // Start observing the document as early as possible observer.observe(document.documentElement, { childList: true, subtree: true }); // Check for existing video elements right away window.addEventListener('load', () => { const video = document.querySelector('video'); if (video && !video.dataset.autoplayDisabled) { stopVideoAutoplay(video); video.dataset.autoplayDisabled = 'true'; } }); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址