<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Website Framer</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
            background-color: #f0f0f0;
            position: relative;
            height: 100vh;
        }
        .input-container {
            position: absolute;
            top: 10px;
            left: 10px;
            display: flex;
            gap: 10px;
        }
        input[type="text"] {
            padding: 5px;
            font-size: 12px;
            width: 180px;
            border-radius: 4px;
            border: 1px solid #ccc;
        }
        button {
            padding: 5px 10px;
            font-size: 12px;
            background-color: #4CAF50;
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
        }
        button:hover {
            background-color: #45a049;
        }
        #website {
            width: 100%;
            height: 100vh;
            border: none;
        }
    </style>
</head>
<body>

    <div class="input-container">
        <input type="text" id="urlInput" placeholder="Enter website URL" />
        <button onclick="loadWebsite()">Go</button>
    </div>

    <object id="website" type="text/html"></object>

    <script>
        function loadWebsite() {
            let url = document.getElementById('urlInput').value.trim();
            if (url) {
                if (!url.startsWith("https://")) {
                    url = "https://" + url;
                }
                const websiteObject = document.getElementById('website');
                websiteObject.data = '';  // Reset the data before changing it
                setTimeout(() => {
                    websiteObject.data = url;
                }, 10); // Small delay to ensure it resets before updating
            }
        }
    </script>

</body>
</html>