Skip to content
The Chat Archive
o1-mini-2024-09-12· OpenAI WildChat-4.8M (AI2)

<p>&nbsp;</p> <style> body { margin: 0; padding: 0; overflow: hidden; height: 100vh;…

  1. User
        .iframe-container {
            position: relative;
            width: 100%;
            height: 100vh;
            overflow: hidden;
        }
    
        iframe {
            width: 100%;
            height: 100%; /* حذف اضافه کردن ۵.۵ سانتی‌متر به ارتفاع */
            border: none;
            display: none; /* مخفی تا زمانی که سایت بارگذاری شود */
            position: relative;
            top: 0; /* حذف مخفی کردن ۵.۵ سانتی‌متر از بالا */
        }
    
        .loading {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            display: flex;
            flex-direction: column;
            align-items: center;
            z-index: 10000;
        }
    
        .loading-message {
            margin-bottom: 20px;
            font-size: 18px;
        }
    
        .progress {
            width: 80%;
            max-width: 400px;
            height: 20px;
            background-color: #ddd;
            border-radius: 5px;
            overflow: hidden;
        }
    
        .progress-bar {
            height: 100%;
            width: 0;
            background-color: #4caf50;
            transition: width 1s;
        }
    
        .error-message {
            display: none;
            color: red;
            margin-top: 20px;
            font-size: 16px;
            text-align: center;
        }
    
        #retryButton {
            display: none;
            margin-top: 10px;
            padding: 10px 20px;
            font-size: 16px;
            cursor: pointer;
            background-color: #4caf50;
            color: white;
            border: none;
            border-radius: 5px;
        }
    
        /* دکمه‌های توضیحات و دانلود صدا بالا */
        .description-button-top, .download-button-top {
            display: block;
            width: 150px;
            color: white;
            text-align: center;
            padding: 10px;
            border-radius: 5px;
            cursor: pointer;
            font-size: 14px;
            transition: background-color 0.3s;
            position: fixed;
            top: 10px;
            z-index: 10001;
            text-decoration: none;
        }
    
        .description-button-top {
            background-color: rgb(84, 110, 122); /* رنگ مشخص برای توضیحات */
            left: 10px; /* قرار دادن در سمت چپ بالای صفحه */
        }
    
        .download-button-top {
            background-color: #4CAF50; /* رنگ سبز برای دانلود صدا */
            right: 10px; /* قرار دادن در سمت راست بالای صفحه */
        }
    
        .description-button-top:hover, .download-button-top:hover {
            background-color: #45a049;
        }
    
        /* دکمه دانلود صدا در پایین صفحه */
        .download-button-bottom {
            position: fixed;
            bottom: 10px;
            left: 50%;
            transform: translateX(-50%);
            background-color: #4CAF50;
            padding: 15px 50px;
            border-radius: 5px;
            color: white;
            text-align: center;
            font-size: 14px;
            text-decoration: none;
            z-index: 10001;
            cursor: pointer;
            min-width: 250px;
            width: auto;
            white-space: nowrap;
            transition: background-color 0.3s;
            display: none; /* مخفی تا زمانی که iframe بارگذاری شود */
        }
    
        .download-button-bottom:hover {
            background-color: #45a049;
        }
    
        /* استایل پنجره سفارشی (modal) */
        .modal {
            display: none;
            position: fixed;
            z-index: 10002;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5);
        }
    
        .modal-content {
            background-color: #fefefe;
            margin: 15% auto;
            padding: 20px;
            border: 1px solid #888;
            width: 80%;
            max-width: 500px;
            text-align: center;
            border-radius: 5px;
        }
    
        .modal-button {
            margin-top: 20px;
            padding: 10px 20px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            font-size: 14px;
        }
    
        .cancel-btn {
            background-color: #f44336;
            color: white;
        }
    
        .translate-btn {
            background-color: #4CAF50;
            color: white;
        }
    
        .translate-btn:hover {
            background-color: #45a049;
        }
    
        .image-container, .audio-container {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
        }
    
        .image-item, .audio-item {
            margin: 10px;
            text-align: center;
        }
    
        .image-item img {
            width: 80px;
            height: 80px;
            object-fit: cover;
            border-radius: 5px;
            margin-bottom: 5px;
        }
    
        .image-item button, .download-audio-button {
            background-color: #4CAF50;
            color: white;
            padding: 5px 10px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            font-size: 12px;
        }
    
        .image-item button:hover, .download-audio-button:hover {
            background-color: #45a049;
        }
    
        .audio-player {
            width: 80%;
            margin-bottom: 10px;
        }
    
        @media (max-width: 768px) {
            iframe {
                height: 100%; /* تنظیم مجدد ارتفاع */
                top: 0;       /* تنظیم مجدد موقعیت */
            }
    
            .description-button-top, .download-button-top {
                width: 120px;
                padding: 8px;
                font-size: 12px;
                top: 5px;
            }
    
            .download-button-bottom {
                width: 90%;
                padding: 12px 40px;
                font-size: 14px;
            }
        }
    </style>
    
        let progress = 0;
        const progressBar = document.getElementById('progressBar');
        const retryButton = document.getElementById('retryButton');
        const errorMessage = document.getElementById('errorMessage');
        const loadingContainer = document.getElementById('loadingContainer');
        let interval;
        let iframeLoadedFlag = false;
    
        // متغیر برای ذخیره‌ی لینک فایل صوتی انتخاب شده
        let selectedAudioUrl = '';
    
        function startProgress() {
            loadingContainer.style.display = 'flex';
            progressBar.style.width = '0%';
            progress = 0;
    
            interval = setInterval(() => {
                if (progress < 100) {
                    progress += 10;
                    progressBar.style.width = progress + '%';
                }
                if (progress === 100) {
                    clearInterval(interval);
                    if (!iframeLoadedFlag) {
                        retryButton.style.display = 'block';
                        errorMessage.style.display = 'block';
                    }
                }
            }, 1000);
        }
    
        function iframeLoaded() {
            iframeLoadedFlag = true;
            clearInterval(interval);
            loadingContainer.style.display = 'none';
            document.getElementById('myIframe').style.display = 'block';
            // نمایش دکمه دانلود پایین صفحه پس از بارگذاری موفق
            document.getElementById('downloadButtonBottom').style.display = 'block';
        }
    
        function iframeError() {
            clearInterval(interval);
            loadingContainer.style.display = 'flex';
            retryButton.style.display = 'block';
            errorMessage.style.display = 'block';
        }
    
        function loadIframe() {
            fetch(siteURL, { method: 'HEAD', mode: 'no-cors' })
                .then(() => {
                    const iframe = document.getElementById('myIframe');
                    iframe.src = siteURL;
                    iframe.onload = iframeLoaded;
                    iframe.onerror = iframeError;
                })
                .catch(() => {
                    iframeError();
                });
        }
    
        retryButton.addEventListener('click', function() {
            progress = 0;
            progressBar.style.width = '0%';
            iframeLoadedFlag = false;
            retryButton.style.display = 'none';
            errorMessage.style.display = 'none';
            loadingContainer.style.display = 'flex';
            document.getElementById('myIframe').style.display = 'none';
            loadIframe();
            startProgress();
        });
    
        // مدیریت پنجره‌های مدال
        const imageModal = document.getElementById('myModal');
        const closeBtn = document.getElementById('closeBtn');
    
        closeBtn.addEventListener('click', function() {
            imageModal.style.display = 'none';
        });
    
        const descriptionModal = document.getElementById('myDescriptionModal');
        const closeDescriptionBtn = document.getElementById('closeDescriptionBtn');
    
        closeDescriptionBtn.addEventListener('click', function() {
            descriptionModal.style.display = 'none';
        });
    
        const audioModal = document.getElementById('myAudioModal');
        const closeAudioModalBtn = document.getElementById('closeAudioModalBtn');
    
        closeAudioModalBtn.addEventListener('click', function() {
            audioModal.style.display = 'none';
        });
    
        const confirmAudioModal = document.getElementById('confirmAudioModal');
        const confirmDownloadAudioBtn = document.getElementById('confirmDownloadAudioBtn');
        const cancelDownloadAudioBtn = document.getElementById('cancelDownloadAudioBtn');
    
        confirmDownloadAudioBtn.addEventListener('click', function() {
            if (selectedAudioUrl) {
                window.open(selectedAudioUrl, '_blank'); // باز کردن لینک در تب جدید
                // بسته شدن پنجره تأیید
                confirmAudioModal.style.display = 'none';
                // پاک کردن متغیر بعد از استفاده
                selectedAudioUrl = '';
            }
        });
    
        cancelDownloadAudioBtn.addEventListener('click', function() {
            // بسته شدن پنجره تأیید
            confirmAudioModal.style.display = 'none';
            // پاک کردن متغیر
            selectedAudioUrl = '';
        });
    
        window.addEventListener('click', function(event) {
            if (event.target == imageModal) {
                imageModal.style.display = 'none';
            }
            if (event.target == descriptionModal) {
                descriptionModal.style.display = 'none';
            }
            if (event.target == audioModal) {
                audioModal.style.display = 'none';
            }
            if (event.target == confirmAudioModal) {
                confirmAudioModal.style.display = 'none';
            }
        });
    
        // مدیریت دکمه‌های دانلود و توضیحات
        const downloadButtonTop = document.getElementById('downloadButtonTop');
        const descriptionButtonTop = document.getElementById('descriptionButtonTop');
        const downloadButtonBottom = document.getElementById('downloadButtonBottom');
    
        // عملکرد دانلود صدا
        function handleDownloadAudio(event) {
            event.preventDefault();
            const iframe = document.getElementById('myIframe');
            let iframeDocument;
            try {
                iframeDocument = iframe.contentDocument || iframe.contentWindow.document;
            } catch (error) {
                console.error("دسترسی به محتوای iframe به دلیل محدودیت‌های امنیتی امکان‌پذیر نیست.", error);
                alert("دسترسی به محتوای iframe به دلیل محدودیت‌های امنیتی امکان‌پذیر نیست.");
                return;
            }
    
            try {
                const links = iframeDocument.querySelectorAll('a');
                if (links.length === 0) {
                    alert("هیچ لینک صوتی برای دانلود یافت نشد.");
                    return;
                }
    
                let wavFiles = [];
                links.forEach((link) => {
                    const href = link.href;
                    if (href && href.toLowerCase().endsWith('.wav')) {
                        wavFiles.push(href);
                    }
                });
    
                if (wavFiles.length === 0) {
                    alert("هیچ فایل صوتی ساخته شده یافت نشد.");
                    return;
                }
    
                // محدود به دو فایل
                wavFiles = wavFiles.slice(0, 2);
    
                const audioContainer = document.getElementById('audioContainer');
                audioContainer.innerHTML = '';
                wavFiles.forEach((audioUrl, index) => {
                    const audioItem = document.createElement('div');
                    audioItem.classList.add('audio-item');
                    // تعیین برچسب بر اساس شماره پلیر
                    let labelText = '';
                    if (index === 0) {
                        labelText = 'خروجی صدای بدون نویز';
                    } else if (index === 1) {
                        labelText = 'خروجی صدای پیشرفته';
                    }
                    audioItem.innerHTML = `
                        <p class="audio-label">${labelText}</p>
                        <audio controls class="audio-player">
                            <source src="${audioUrl}" type="audio/wav">
                            مرورگر شما از پخش این فایل صوتی پشتیبانی نمی‌کند.
                        </audio>
                        <button class="download-audio-button" onclick="downloadAudio('${audioUrl}')">دانلود صدا</button>
                    `;
                    audioContainer.appendChild(audioItem);
                });
                audioModal.style.display = 'block';
            } catch (error) {
                console.error("خطا در شناسایی صداها: ", error);
                alert("خطایی در شناسایی صداها رخ داد.");
            }
        }
    
        // عملکرد نمایش توضیحات
        function handleShowDescription(event) {
            event.preventDefault();
            descriptionModal.style.display = 'block';
        }
    
        // عملکرد دانلود تصاویر (اگر نیاز دارید، می‌توانید آن را فعال کنید)
        function handleDownloadImages(event) {
            event.preventDefault();
            const iframe = document.getElementById('myIframe');
            let iframeDocument;
            try {
                iframeDocument = iframe.contentDocument || iframe.contentWindow.document;
            } catch (error) {
                console.error("دسترسی به محتوای iframe به دلیل محدودیت‌های امنیتی امکان‌پذیر نیست.", error);
                alert("دسترسی به محتوای iframe به دلیل محدودیت‌های امنیتی امکان‌پذیر نیست.");
                return;
            }
    
            try {
                const links = iframeDocument.querySelectorAll('a');
                if (links.length === 0) {
                    alert("هیچ لینک تصویری برای دانلود یافت نشد.");
                    return;
                }
    
                let imageFiles = [];
                links.forEach((link) => {
                    const href = link.href;
                    if (href && (href.toLowerCase().endsWith('.png') || href.toLowerCase().endsWith('.jpg') || href.toLowerCase().endsWith('.jpeg'))) {
                        // بررسی اینکه لینک در excludeUrls نباشد
                        if (!excludeUrls.includes(href)) {
                            imageFiles.push(href);
                        }
                    }
                });
    
                if (imageFiles.length === 0) {
                    alert("هیچ فایل تصویری قابل دانلود یافت نشد.");
                    return;
                }
    
                const imageContainer = document.getElementById('imageContainer');
                imageContainer.innerHTML = '';
                imageFiles.forEach((imageUrl) => {
                    const imageItem = document.createElement('div');
                    imageItem.classList.add('image-item');
                    imageItem.innerHTML = `
                        <img src="${imageUrl}" alt="تصویر">
                        <button onclick="downloadImage('${imageUrl}')">دانلود تصویر</button>
                    `;
                    imageContainer.appendChild(imageItem);
                });
                imageModal.style.display = 'block';
            } catch (error) {
                console.error("خطا در شناسایی تصاویر: ", error);
                alert("خطایی در شناسایی تصاویر رخ داد.");
            }
        }
    
        function downloadAudio(audioUrl) {
            // ذخیره لینک فایل صوتی انتخاب شده
            selectedAudioUrl = audioUrl;
            // نمایش پنجره تأیید
            confirmAudioModal.style.display = 'block';
        }
    
        function downloadImage(imageUrl) {
            // باز کردن لینک تصویر در تب جدید
            window.open(imageUrl, '_blank');
        }
    
        // Event listeners برای دکمه‌های جدید
        downloadButtonTop.addEventListener('click', handleDownloadAudio);
        descriptionButtonTop.addEventListener('click', handleShowDescription);
        downloadButtonBottom.addEventListener('click', handleDownloadAudio);
    
        // اجرای بارگذاری iframe و آغاز لودینگ
        loadIframe();
        startProgress();
    </script>
    
  2. Assistant

    متن شما را بهبود داده‌ام تا دکمه‌های توضیحات و دانلود صدا در بالای صفحه حذف شوند و تنها دکمه دانلود صدا در پایین صفحه بدون متن و بدون عملکرد باقی بماند. همچنین، تمام کدهای مربوط به این دکمه‌ها از جاوااسکریپت حذف شده‌اند تا عملکرد صحیح صفحه حفظ شود. در ادامه، کد کامل یکجا را مشاهده می‌کنید:

    <p>&nbsp;</p>
    <style>
        body {
            margin: 0;
            padding: 0;
            overflow: hidden;
            height: 100vh;
            background-color: #f0f0f0;
            font-family: Arial, sans-serif;
        }
    
        .iframe-container {
            position: relative;
            width: 100%;
            height: 100vh;
            overflow: hidden;
        }
    
        iframe {
            width: 100%;
            height: 100%; /* حذف اضافه کردن ۵.۵ سانتی‌متر به ارتفاع */
            border: none;
            display: none; /* مخفی تا زمانی که سایت بارگذاری شود */
            position: relative;
            top: 0; /* حذف مخفی کردن ۵.۵ سانتی‌متر از بالا */
        }
    
        .loading {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            display: flex;
            flex-direction: column;
            align-items: center;
            z-index: 10000;
        }
    
        .loading-message {
            margin-bottom: 20px;
            font-size: 18px;
        }
    
        .progress {
            width: 80%;
            max-width: 400px;
            height: 20px;
            background-color: #ddd;
            border-radius: 5px;
            overflow: hidden;
        }
    
        .progress-bar {
            height: 100%;
            width: 0;
            background-color: #4caf50;
            transition: width 1s;
        }
    
        .error-message {
            display: none;
            color: red;
            margin-top: 20px;
            font-size: 16px;
            text-align: center;
        }
    
        #retryButton {
            display: none;
            margin-top: 10px;
            padding: 10px 20px;
            font-size: 16px;
            cursor: pointer;
            background-color: #4caf50;
            color: white;
            border: none;
            border-radius: 5px;
        }
    
        /* دکمه دانلود صدا در پایین صفحه */
        .download-button-bottom {
            position: fixed;
            bottom: 10px;
            left: 50%;
            transform: translateX(-50%);
            background-color: #4CAF50;
            padding: 15px 50px;
            border-radius: 5px;
            color: white;
            text-align: center;
            font-size: 14px;
            text-decoration: none;
            z-index: 10001;
            cursor: pointer;
            min-width: 250px;
            width: auto;
            white-space: nowrap;
            transition: background-color 0.3s;
            display: none; /* مخفی تا زمانی که iframe بارگذاری شود */
        }
    
        .download-button-bottom:hover {
            background-color: #45a049;
        }
    
        /* استایل پنجره سفارشی (modal) */
        .modal {
            display: none;
            position: fixed;
            z-index: 10002;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5);
        }
    
        .modal-content {
            background-color: #fefefe;
            margin: 15% auto;
            padding: 20px;
            border: 1px solid #888;
            width: 80%;
            max-width: 500px;
            text-align: center;
            border-radius: 5px;
        }
    
        .modal-button {
            margin-top: 20px;
            padding: 10px 20px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            font-size: 14px;
        }
    
        .cancel-btn {
            background-color: #f44336;
            color: white;
        }
    
        .translate-btn {
            background-color: #4CAF50;
            color: white;
        }
    
        .translate-btn:hover {
            background-color: #45a049;
        }
    
        .image-container, .audio-container {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
        }
    
        .image-item, .audio-item {
            margin: 10px;
            text-align: center;
        }
    
        .image-item img {
            width: 80px;
            height: 80px;
            object-fit: cover;
            border-radius: 5px;
            margin-bottom: 5px;
        }
    
        .image-item button, .download-audio-button {
            background-color: #4CAF50;
            color: white;
            padding: 5px 10px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            font-size: 12px;
        }
    
        .image-item button:hover, .download-audio-button:hover {
            background-color: #45a049;
        }
    
        .audio-player {
            width: 80%;
            margin-bottom: 10px;
        }
    
        @media (max-width: 768px) {
            iframe {
                height: 100%; /* تنظیم مجدد ارتفاع */
                top: 0;       /* تنظیم مجدد موقعیت */
            }
    
            .download-button-bottom {
                width: 90%;
                padding: 12px 40px;
                font-size: 14px;
            }
        }
    </style>
    
    <!-- پنجره سفارشی (modal) برای تصاویر شناسایی شده -->
    <div id="myModal" class="modal">
        <div class="modal-content">
            <p style="text-align: center;">تصاویر شناسایی&zwnj;شده</p>
            <div class="image-container" id="imageContainer"><!-- تصاویر شناسایی‌شده در اینجا قرار می‌گیرند --></div>
            <button class="modal-button cancel-btn" id="closeBtn">بستن</button>
        </div>
    </div>
    
    <!-- پنجره سفارشی (modal) برای توضیحات -->
    <div id="myDescriptionModal" class="modal">
        <div class="modal-content">
            <p style="text-align: center;">دستیار مجهز به هوش مصنوعی شما</p>
            <p style="text-align: center;"><span style="color: #0000ff;"><strong>افزایش کیفیت صدا</strong></span> بهره وری از پیشرفته&zwnj;ترین مدل هوش مصنوعی برای تقویت فایل&zwnj;های صوتی</p>
            <p style="text-align: center;">حذف نویز و تقویت پیشرفته صدا AI&nbsp;</p>
            <button class="modal-button cancel-btn" id="closeDescriptionBtn">بستن</button>
        </div>
    </div>
    
    <!-- پنجره سفارشی (modal) برای دانلود صداها -->
    <div id="myAudioModal" class="modal">
        <div class="modal-content">
            <p style="text-align: center;">صداهای شناسایی&zwnj;شده</p>
            <div class="audio-container" id="audioContainer"><!-- پلیرهای صدا در اینجا قرار خواهند گرفت --></div>
            <button class="modal-button cancel-btn" id="closeAudioModalBtn">بستن</button>
        </div>
    </div>
    
    <!-- پنجره تأیید دانلود صدا -->
    <div id="confirmAudioModal" class="modal">
        <div class="modal-content">
            <p>برای دانلود فایل صوتی روی تایید کلیک کنید و بعد از باز شدن مرورگر، در سمت راست فایل را کلیک کرده و گزینه بارگیری فایل را انتخاب کنید.</p>
            <button class="modal-button translate-btn" id="confirmDownloadAudioBtn">تایید</button>
            <button class="modal-button cancel-btn" id="cancelDownloadAudioBtn">لغو</button>
        </div>
    </div>
    
    <!-- لودینگ و iframe -->
    <div class="iframe-container">
        <div class="loading" id="loadingContainer">
            <div class="loading-message">لطفاً صبر کنید...</div>
            <div class="progress">
                <div class="progress-bar" id="progressBar"></div>
            </div>
            <div class="error-message" id="errorMessage">بارگیری زیاد طول کشید.<br />در صورت عدم بارگذاری، فیلترشکن خود را روشن کنید.</div>
            <button id="retryButton">بارگذاری مجدد</button>
        </div>
        <iframe id="myIframe"></iframe>
    </div>
    
    <!-- دکمه دانلود در پایین صفحه بدون متن و بدون عملکرد -->
    <p><a href="#" class="download-button-bottom" id="downloadButtonBottom"></a></p>
    
    <script>
        const siteURL = 'https://ovi054-image-to-prompt.hf.space/';
        const excludeUrls = [
            'https://yanze-pulid.hf.space/--replicas/3t64n/file=/tmp/gradio/7567beceda2541f726af7beb4c9aa857b4a96b77/liuyifei.png'
        ];
    
        let progress = 0;
        const progressBar = document.getElementById('progressBar');
        const retryButton = document.getElementById('retryButton');
        const errorMessage = document.getElementById('errorMessage');
        const loadingContainer = document.getElementById('loadingContainer');
        let interval;
        let iframeLoadedFlag = false;
    
        // متغیر برای ذخیره‌ی لینک فایل صوتی انتخاب شده
        let selectedAudioUrl = '';
    
        function startProgress() {
            loadingContainer.style.display = 'flex';
            progressBar.style.width = '0%';
            progress = 0;
    
            interval = setInterval(() => {
                if (progress < 100) {
                    progress += 10;
                    progressBar.style.width = progress + '%';
                }
                if (progress === 100) {
                    clearInterval(interval);
                    if (!iframeLoadedFlag) {
                        retryButton.style.display = 'block';
                        errorMessage.style.display = 'block';
                    }
                }
            }, 1000);
        }
    
        function iframeLoaded() {
            iframeLoadedFlag = true;
            clearInterval(interval);
            loadingContainer.style.display = 'none';
            document.getElementById('myIframe').style.display = 'block';
            // نمایش دکمه دانلود پایین صفحه پس از بارگذاری موفق
            document.getElementById('downloadButtonBottom').style.display = 'block';
        }
    
        function iframeError() {
            clearInterval(interval);
            loadingContainer.style.display = 'flex';
            retryButton.style.display = 'block';
            errorMessage.style.display = 'block';
        }
    
        function loadIframe() {
            fetch(siteURL, { method: 'HEAD', mode: 'no-cors' })
                .then(() => {
                    const iframe = document.getElementById('myIframe');
                    iframe.src = siteURL;
                    iframe.onload = iframeLoaded;
                    iframe.onerror = iframeError;
                })
                .catch(() => {
                    iframeError();
                });
        }
    
        retryButton.addEventListener('click', function() {
            progress = 0;
            progressBar.style.width = '0%';
            iframeLoadedFlag = false;
            retryButton.style.display = 'none';
            errorMessage.style.display = 'none';
            loadingContainer.style.display = 'flex';
            document.getElementById('myIframe').style.display = 'none';
            loadIframe();
            startProgress();
        });
    
        // مدیریت پنجره‌های مدال
        const imageModal = document.getElementById('myModal');
        const closeBtn = document.getElementById('closeBtn');
    
        closeBtn.addEventListener('click', function() {
            imageModal.style.display = 'none';
        });
    
        const descriptionModal = document.getElementById('myDescriptionModal');
        const closeDescriptionBtn = document.getElementById('closeDescriptionBtn');
    
        closeDescriptionBtn.addEventListener('click', function() {
            descriptionModal.style.display = 'none';
        });
    
        const audioModal = document.getElementById('myAudioModal');
        const closeAudioModalBtn = document.getElementById('closeAudioModalBtn');
    
        closeAudioModalBtn.addEventListener('click', function() {
            audioModal.style.display = 'none';
        });
    
        const confirmAudioModal = document.getElementById('confirmAudioModal');
        const confirmDownloadAudioBtn = document.getElementById('confirmDownloadAudioBtn');
        const cancelDownloadAudioBtn = document.getElementById('cancelDownloadAudioBtn');
    
        confirmDownloadAudioBtn.addEventListener('click', function() {
            if (selectedAudioUrl) {
                window.open(selectedAudioUrl, '_blank'); // باز کردن لینک در تب جدید
                // بسته شدن پنجره تأیید
                confirmAudioModal.style.display = 'none';
                // پاک کردن متغیر بعد از استفاده
                selectedAudioUrl = '';
            }
        });
    
        cancelDownloadAudioBtn.addEventListener('click', function() {
            // بسته شدن پنجره تأیید
            confirmAudioModal.style.display = 'none';
            // پاک کردن متغیر
            selectedAudioUrl = '';
        });
    
        window.addEventListener('click', function(event) {
            if (event.target == imageModal) {
                imageModal.style.display = 'none';
            }
            if (event.target == descriptionModal) {
                descriptionModal.style.display = 'none';
            }
            if (event.target == audioModal) {
                audioModal.style.display = 'none';
            }
            if (event.target == confirmAudioModal) {
                confirmAudioModal.style.display = 'none';
            }
        });
    
        const downloadButtonBottom = document.getElementById('downloadButtonBottom');
        // هیچ عملکردی به دکمه دانلود پایین صفحه متصل نشده است
    
        // اجرای بارگذاری iframe و آغاز لودینگ
        loadIframe();
        startProgress();
    </script>
    </p>
    

    توضیحات تغییرات:

    1. حذف دکمه‌های بالای صفحه:

      • کد HTML مربوط به دکمه‌های توضیحات (description-button-top) و دانلود صدا (download-button-top) در بالای صفحه حذف شده است.
      • همچنین استایل‌های CSS مربوط به این دکمه‌ها نیز حذف شده‌اند تا فضای صفحه تمیز و بدون اجزای اضافی باشد.
    2. دکمه دانلود پایین صفحه:

      • دکمه دانلود در پایین صفحه (download-button-bottom) بدون متن و بدون عملکرد باقی مانده است.
      • در HTML، محتوای این دکمه حذف شده تا فقط به عنوان یک دکمه خالی نمایش داده شود:
        <p><a href="#" class="download-button-bottom" id="downloadButtonBottom"></a></p>
        
      • در جاوااسکریپت، هیچ رویدادی به این دکمه اضافه نشده است تا در صورت کلیک، هیچ عملی انجام ندهد.
    3. حذف کدهای جاوااسکریپت مرتبط با دکمه‌های حذف شده:

      • تمامی متغیرها و event listener‌های مربوط به دکمه‌های حذف شده از جاوااسکریپت حذف شده‌اند تا از بروز خطاهای احتمالی جلوگیری شود.
    4. حفظ عملکرد اصلی صفحه:

      • قسمت‌های مربوط به بارگذاری iframe و نمایش دکمه دانلود پایین صفحه پس از بارگذاری موفقیت‌آمیز iframe حفظ شده‌اند.
      • سایر پنجره‌های مودال (مانند تصاویر شناسایی شده و دانلود صداها) بدون تغییر باقی مانده‌اند تا در صورت نیاز قابل استفاده باشند.

    نکات اضافی:

    • ظاهر دکمه دانلود پایین صفحه: اگر نیاز به تغییر رنگ دکمه دانلود دارید، می‌توانید خصوصیت background-color در کلاس .download-button-bottom را تغییر دهید. مثلا:

      .download-button-bottom {
          background-color: #FF5733; /* رنگ مورد نظر خود را وارد کنید */
          /* سایر استایل‌ها */
      }
      
    • ظاهر دکمه در واکنش‌گرایی (responsive): در قسمت @media نیز می‌توانید استایل‌های مربوط به دکمه دانلود پایین صفحه را به دلخواه تنظیم کنید.

    با این تغییرات، دکمه دانلود صدا در پایین صفحه به صورت یک دکمه خالی ظاهر می‌شود و هیچ عملکردی ندارد. تمامی دکمه‌ها و عملکردهای اضافی در بالای صفحه حذف شده‌اند تا تجربه کاربری ساده‌تر و تمیزتری ایجاد شود.