<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="description" content="Embedded iframe page for lekmanga.net with restricted popup functionality.">
    <meta name="robots" content="noindex, nofollow">
    <title>LekManga For Free</title>

    <style>
        :root {
            --button-bg: #ff0000;
            --button-hover-bg: #cc0000;
            --button-color: #ffffff;
        }

        body {
            margin: 0;
            overflow: hidden;
            font-family: Arial, sans-serif;
        }

        iframe {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            border: none;
        }

        .button-container {
            position: absolute;
            top: 10px;
            right: 10px;
            z-index: 1000;
        }

        .redirect-button {
            background-color: var(--button-bg);
            color: var(--button-color);
            border: none;
            padding: 10px 20px;
            font-size: 16px;
            cursor: pointer;
            border-radius: 5px;
            transition: background-color 0.3s ease;
        }

        .redirect-button:hover {
            background-color: var(--button-hover-bg);
        }

        .overlay-image {
            position: absolute;
            top: 0;
            left: 0;
            z-index: 999;
            width: auto;
            height: auto;
        }
    </style>

    <script>
        document.addEventListener('DOMContentLoaded', () => {
            const redirectButton = document.querySelector('.redirect-button');

            // Redirect button click event
            redirectButton.addEventListener('click', () => {
                window.location.assign('https://promanga.pro/');
            });

            // Add the new image overlay
            const newImage = document.createElement('img');
            newImage.src = "https://pronovels.com/wp-content/uploads/2024/12/LeekManga.png";
            newImage.alt = "Overlay Image";
            newImage.classList.add('overlay-image');

            // Append the overlay image to the body
            document.body.appendChild(newImage);

            // Generate a random user agent for the iframe
            const userAgents = [
                "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
                "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
                "Mozilla/5.0 (Linux; Android 10; SM-G975F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Mobile Safari/537.36",
                "Mozilla/5.0 (iPhone; CPU iPhone OS 14_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Mobile/15E148 Safari/604.1",
                "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36"
            ];

            const randomUserAgent = userAgents[Math.floor(Math.random() * userAgents.length)];

            const iframe = document.createElement('iframe');
            iframe.src = `https://corsproxy.io/?url=${encodeURIComponent('https://lekmanga.net/')}`;
            iframe.sandbox = "allow-same-origin allow-scripts";
            iframe.style.position = "absolute";
            iframe.style.top = "0";
            iframe.style.left = "0";
            iframe.style.width = "100%";
            iframe.style.height = "100%";
            iframe.style.border = "none";

            // Set a random user agent by appending it as a query parameter (optional workaround)
            iframe.src += `&user-agent=${encodeURIComponent(randomUserAgent)}`;

            // Append the iframe to the body
            document.body.appendChild(iframe);
        });
    </script>
</head>
<body>

<div class="button-container">
    <button class="redirect-button" aria-label="Redirect to Promanga">
        عُد إلى مانجا برو
    </button>
</div>

</body>
</html>
