- "pageAction": "eles.forEach(container => { let anchor = container.querySelector('a[data-role=\"thumb-link\"]'); if (!anchor) return; let trailerUrl = anchor.getAttribute('data-previewvideo'); if (!trailerUrl) return; if (getComputedStyle(anchor).position !== 'relative') anchor.style.position = 'relative'; let videoElem = null; anchor.addEventListener('mouseenter', () => { if (videoElem) return; videoElem = Object.assign(document.createElement('video'), { src: trailerUrl, loop: true, muted: true, autoplay: true, playsInline: true }); Object.assign(videoElem.style, { position: 'absolute', top: 0, left: 0, width: '100%', height: '100%', objectFit: 'cover', zIndex: 10, pointerEvents: 'none', backgroundColor: 'black' }); anchor.appendChild(videoElem); videoElem.play(); }); anchor.addEventListener('mouseleave', () => { if (!videoElem) return; videoElem.pause(); videoElem.remove(); videoElem = null; }); }); if (typeof window._pagetualPageCounter === 'undefined') { window._pagetualPageCounter = 1; let pagetualDebug = document.createElement('div'); pagetualDebug.id = 'pagetual-debug'; pagetualDebug.style.cssText = 'position: fixed; bottom: 10px; right: 10px; background: rgba(0,0,0,0.8); color: #0f0; font-family: monospace; font-size: 12px; padding: 3px 4px; border-radius: 5px; z-index: 99999; display: block !important; transform: scale(0.8); transform-origin: bottom right;'; document.body.appendChild(pagetualDebug); } else { window._pagetualPageCounter++; } let debugDiv = document.getElementById('pagetual-debug'); if (debugDiv) debugDiv.textContent = 'P ' + window._pagetualPageCounter; setTimeout(() => { let allThumbs = document.querySelectorAll('.thumb-list__item:not(.loading)'); let hasVisible = Array.from(allThumbs).some(ele => { let style = window.getComputedStyle(ele); return style.display !== 'none' && style.visibility !== 'hidden' && ele.offsetParent !== null; }); if (!hasVisible && !window._pagetualAutoScrollTriggered) { window._pagetualAutoScrollTriggered = true; setTimeout(() => { window.scrollBy(0, 1); setTimeout(() => { window.scrollBy(0, -1); setTimeout(() => { window._pagetualAutoScrollTriggered = false; }, 200); }, 200); }, 50); } }, 500);"
0 commit comments