// ==UserScript== // @name Prevent Tubi Autoplay // @version 0.3 // @description Prevents autoplay on Tubi // @match https://tubitv.com/* // @namespace https://greasyfork.org/users/189717 // @downloadURL none // ==/UserScript== (() => { setInterval(() => { ['click', 'keydown'].forEach((type) => { document.addEventListener(type, () => { localStorage.setItem('last user action', Date.now()) }) }) 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) })()