HTML Boilerplate
Sources:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Template Title</title>
<meta name="viewport" content="width=device-width,initial-scale=1" />
<meta name="description" content="Description Goes Here" />
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<h1>Template</h1>
<script src="index.js"></script>
</body>
</html>
// On pressing ENTER call toggleFullScreen method
document.addEventListener("keydown", (e) => {
if (e.key === "Enter") {
toggleFullScreen(element);
}
});
function toggleFullScreen(element) {
if (!document.fullscreenElement) {
// If the document is not in full screen mode
// make the video full screen
element.requestFullscreen();
} else {
// Otherwise exit the full screen
document.exitFullscreen?.();
}
}