您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Automatically disables autoplay on YouTube videos for a better viewing experience.
// ==UserScript== // @name YouTube Autoplay Off // @name:tr YouTube Otomatik Oynatma Kapat // @version 1.6 // @author Alyssa B. Morton // @license MIT // @icon https://www.youtube.com/favicon.ico // @namespace https://violentmonkey.github.io/ // @match *://www.youtube.com/* // @grant none // @description Automatically disables autoplay on YouTube videos for a better viewing experience. // @description:tr YouTube videolarında otomatik oynatmayı devre dışı bırakır ve daha iyi bir izleme deneyimi sunar. // ==/UserScript== (function() { 'use strict'; // Function to turn off autoplay function turnOffAutoplay() { const autoplayButton = document.querySelector('.ytp-autonav-toggle-button[aria-checked="true"]'); if (autoplayButton) { autoplayButton.click(); // Turn off autoplay } } // Function to check if autoplay is on and turn it off function checkAutoplay() { const autoplayButton = document.querySelector('.ytp-autonav-toggle-button'); if (autoplayButton && autoplayButton.getAttribute('aria-checked') === 'true') { turnOffAutoplay(); // Turn off autoplay if it is on } } // Function to observe changes in the DOM function observeDOMChanges() { const observer = new MutationObserver(() => { checkAutoplay(); // Check if autoplay is on }); // Start observing the body for child list changes observer.observe(document.body, { childList: true, subtree: true }); } // Wait for the YouTube page to load window.addEventListener('load', () => { // Wait for an additional 60 seconds before turning off autoplay setTimeout(() => { turnOffAutoplay(); // Turn off autoplay after 60 seconds observeDOMChanges(); // Start observing for changes }, 60000); // 60000 milliseconds = 60 seconds }); // Listen for the 'play' event on the video element document.addEventListener('play', (event) => { if (event.target.tagName === 'VIDEO') { checkAutoplay(); // Check if autoplay is on when a video starts playing } }, true); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址