Update html/watch.ejs

This commit is contained in:
ashley 2025-11-06 22:37:58 +01:00
parent 0d18e56221
commit d67072b7ec

View File

@ -2428,6 +2428,25 @@ if (/[?&]autoplay=/.test(location.search)) {
</script>
<script>
function sendStats(videoId) {
if (!videoId) return
if (window.__pokeStatsSent) return
window.__pokeStatsSent = true
const payload = { videoId }
fetch("/api/stats", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(payload),
keepalive: true
}).catch(() => {})
}
sendStats(new URLSearchParams(location.search).get("v"))
function toggleTheaterMode() {
var videoPlayerContainer = document.querySelector('.video-player-container');
if (videoPlayerContainer.classList.contains('theatermodeon')) {