Update html/watch.ejs
This commit is contained in:
parent
0d18e56221
commit
d67072b7ec
@ -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')) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user