<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Open Game in New Window</title>
</head>

<body>
    <button onclick="openGame()">Open Game</button>

    <script>
        function openGame() {
            // Open a new window
            var win = window.open('', '', 'width=800,height=600,scrollbars=yes,resizable=yes'); // Set a default size for the window

            // URL to load in the iframe
            var url = "https://eggy-car.github.io";

            // Create an iframe element
            var iframe = win.document.createElement('iframe');
            
            // Apply styles to ensure no borders, margin, or padding
            iframe.style.width = "100%";
            iframe.style.height = "100%";
            iframe.style.border = "none"; // Remove border
            iframe.style.margin = "0"; // Remove any margin
            iframe.style.padding = "0"; // Remove any padding
            
            // Set the source of the iframe
            iframe.src = url;

            // Set the body styles of the new window
            win.document.body.style.margin = "0"; // Remove margin around body
            win.document.body.style.padding = "0"; // Remove padding around body
            win.document.body.style.overflow = "hidden"; // Hide scrollbars on body if necessary
            
            // Append iframe to the body of the new window
            win.document.body.appendChild(iframe);
        }
    </script>
