// ==UserScript== // @name Disable YouTube "Autoplay next video" // @namespace https://vlw.se/ // @version 2026-04-10 // @description Automatically disable autoplay of next video at the end of the current video // @author Victor Westerlund // @match https://www.youtube.com/watch?v=* // @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com // @grant none // ==/UserScript== (function() { 'use strict'; const disableAutoplay = () => { const target = document.querySelector(".ytp-autonav-toggle-button"); // Mission accomplished if (target && target.ariaChecked === "false") { return; } // Attempt to disable autoplay target?.click(); requestIdleCallback(disableAutoplay); } setTimeout(() => requestIdleCallback(disableAutoplay), 3000); })();