<html lang="en">
<head>
<script>
    window.addEventListener('resize', () => {
        const threshold = 300; // Adjust the threshold as needed
        if (window.outerWidth - window.innerWidth > threshold || window.outerHeight - window.innerHeight > threshold) {
            document.body.innerHTML = ''; // Clear the entire page
            const img = document.createElement('img'); // Create an image element
            img.src = 'dra.png'; // Set the image source
            img.alt = 'Image'; // Add an alt attribute for accessibility
            img.style.width = '100%'; // Make the image responsive
            img.style.height = 'auto'; // Maintain aspect ratio
            document.body.appendChild(img); // Add the image to the body
        }
    });
</script>

    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Blooket</title>
</head>
<body>
    <script>
        var url = "rojolet.html"; 
        var win;
        var combo = ['E', 'G', 'G', 'D', 'O', 'M'];
        var currentIndex = 0;

        // Listen for keydown events
        document.addEventListener('keydown', function(event) {
            if (event.key.toUpperCase() === combo[currentIndex]) {
                currentIndex++; 
                if (currentIndex === combo.length) {
                    createFullscreenButton(); // Create the button when the combo is complete
                }
            } else {
                currentIndex = 0;
            }
        });

        function createFullscreenButton() {
            var button = document.createElement('button');
            button.innerHTML = '';
            document.body.appendChild(button);
            
            button.onclick = function() {
                if (win) {
                    win.focus();
                } else {
                    win = window.open(); 
                    win.document.body.style.margin = '0';
                    win.document.body.style.height = '100vh';
                    var iframe = win.document.createElement('iframe');
                    iframe.style.border = 'none';
                    iframe.style.width = '100%';
                    iframe.style.height = '100%';
                    iframe.src = url; 
                    win.document.body.appendChild(iframe); 
                }
                button.style.background = 'grey'; 
                button.innerHTML = ""; 
            };
        }
    </script>
</body>
</html>