// ==UserScript== // @name YouTube Reverse Hack (Mejorado) // @namespace https://chat.openai.com/ // @version 0.3 // @description Simula reproducción reversa más suave en YouTube (solo vídeo) // @match https://www.youtube.com/watch* // @grant none // ==/UserScript== (function () { 'use strict'; let reverseActive = false; let rafId = null; const step = 0.04; // segundos por frame ~25fps const delay = 40; // ms entre frames function waitForVideo(callback) { const check = setInterval(() => { const video = document.querySelector('video'); if (video && video.readyState >= 2) { clearInterval(check); callback(video); } }, 300); } function createButton(video) { const btn = document.createElement('button'); btn.textContent = '⏪ Reverse'; Object.assign(btn.style, { position: 'fixed', bottom: '100px', left: '20px', zIndex: 9999, padding: '10px', background: '#111', color: '#fff', border: 'none', borderRadius: '6px', cursor: 'pointer', fontSize: '14px', opacity: 0.85, }); btn.onclick = () => { reverseActive = !reverseActive; if (reverseActive) { video.pause(); stepBack(video); btn.textContent = '⏹️ Stop Reverse'; } else { cancelAnimationFrame(rafId); btn.textContent = '⏪ Reverse'; } }; document.body.appendChild(btn); } function stepBack(video) { if (!reverseActive) return; const now = video.currentTime; if (now <= 0.04) { reverseActive = false; return; } video.currentTime = now - step; rafId = requestAnimationFrame(() => { setTimeout(() => stepBack(video), delay); }); } waitForVideo((video) => { createButton(video); }); })();