// ==UserScript== // @name Universal Autoplay Stopper // @version 0.5 // @description Aims to prevent autoplay on any streaming service! // @match https://*/* // @namespace https://greasyfork.org/users/189717 // @downloadURL none // ==/UserScript== (() => { ['click', 'keydown'].forEach((type) => { document.addEventListener(type, () => { localStorage.setItem('last user action', Date.now()) }) }) setInterval(() => { document.querySelectorAll('video').forEach((v) => { const timeSinceAction = Date.now() - (localStorage.getItem('last user action') ?? 0) if(v.currentTime < 30 && timeSinceAction > 60000 && !v.paused){ v.pause() } }) }, 1000) })()