Spaces:
Running
Running
Commit
·
b5b4524
1
Parent(s):
ccfb10d
Update templates/index.html
Browse files- templates/index.html +37 -0
templates/index.html
CHANGED
@@ -323,6 +323,43 @@
|
|
323 |
countryElement.textContent = "connecting...";
|
324 |
}
|
325 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
326 |
|
327 |
</script>
|
328 |
</body>
|
|
|
323 |
countryElement.textContent = "connecting...";
|
324 |
}
|
325 |
});
|
326 |
+
|
327 |
+
|
328 |
+
// Fullscreen
|
329 |
+
document.addEventListener("DOMContentLoaded", function() {
|
330 |
+
const feed = document.getElementById("feed");
|
331 |
+
|
332 |
+
let isFullscreen = false; // To track fullscreen state
|
333 |
+
|
334 |
+
feed.addEventListener("click", function() {
|
335 |
+
if (!isFullscreen) {
|
336 |
+
if (this.requestFullscreen) {
|
337 |
+
this.requestFullscreen();
|
338 |
+
} else if (this.mozRequestFullScreen) {
|
339 |
+
this.mozRequestFullScreen();
|
340 |
+
} else if (this.webkitRequestFullscreen) {
|
341 |
+
this.webkitRequestFullscreen();
|
342 |
+
} else if (this.msRequestFullscreen) {
|
343 |
+
this.msRequestFullscreen();
|
344 |
+
}
|
345 |
+
} else {
|
346 |
+
if (document.exitFullscreen) {
|
347 |
+
document.exitFullscreen();
|
348 |
+
} else if (document.mozCancelFullScreen) {
|
349 |
+
document.mozCancelFullScreen();
|
350 |
+
} else if (document.webkitExitFullscreen) {
|
351 |
+
document.webkitExitFullscreen();
|
352 |
+
} else if (document.msExitFullscreen) {
|
353 |
+
document.msExitFullscreen();
|
354 |
+
}
|
355 |
+
}
|
356 |
+
});
|
357 |
+
|
358 |
+
// Listen for fullscreen changes to update isFullscreen
|
359 |
+
document.addEventListener("fullscreenchange", function() {
|
360 |
+
isFullscreen = !isFullscreen;
|
361 |
+
});
|
362 |
+
});
|
363 |
|
364 |
</script>
|
365 |
</body>
|