// ==UserScript== // @name Prevent Tubi Autoplay // @version 0.2 // @description Prevents autoplay on Tubi // @match https://tubitv.com/* // @namespace https://greasyfork.org/users/189717 // @downloadURL none // ==/UserScript== (() => { let lastUserAction = 0 setInterval(() => { ['click', 'keydown'].forEach((type) => { document.addEventListener(type, () => { lastUserAction = Date.now() }) }) document.querySelectorAll('video').forEach((v) => { const timeSinceAction = Date.now() - lastUserAction if(v.currentTime < 30 && timeSinceAction > 60000 && !v.paused){ v.pause() } }) }, 1000) })()