HEX
Server: Apache
System: Linux d5123.usc1.stableserver.net 5.14.0-570.17.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Sat May 24 12:53:17 EDT 2025 x86_64
User: d5123 (1001)
PHP: 8.4.21
Disabled: NONE
Upload Files
File: /home/d5123/myboofola_com/wp-content/plugins/mxchat-basic/js/embedding-check.js
document.addEventListener('DOMContentLoaded', function() {
    var urlParams = new URLSearchParams(window.location.search);
    if (urlParams.has('embedding_failed')) {
        alert('Failed to generate embedding for the content. Please try submitting again.');
    }

    // Sitemap Form Loader
    var sitemapForm = document.getElementById('mxchat-sitemap-form');
    
    if (sitemapForm) {
        var loadingSpinner = document.getElementById('mxchat-sitemap-loading');
        var loadingText = document.getElementById('mxchat-loading-text');
        var sitemapUrlField = document.getElementById('sitemap_url');
        var submitButton = sitemapForm.querySelector('input[type="submit"]');

        sitemapForm.addEventListener('submit', function() {
            sitemapUrlField.style.display = 'none';
            submitButton.style.display = 'none';

            loadingSpinner.style.display = 'flex';
            loadingText.style.display = 'block';
        });
    }

    // Submit Content Form Loader
    var contentForm = document.getElementById('mxchat-content-form');
    
    if (contentForm) {
        var contentLoadingSpinner = document.getElementById('mxchat-content-loading');
        var contentLoadingText = document.getElementById('mxchat-content-loading-text');
        var articleContentField = document.getElementById('article_content');
        var articleUrlField = document.getElementById('article_url');
        var contentSubmitButton = contentForm.querySelector('input[type="submit"]');

        contentForm.addEventListener('submit', function() {
            // Hide form fields
            articleContentField.style.display = 'none';
            articleUrlField.style.display = 'none';
            contentSubmitButton.style.display = 'none';

            // Show loading spinner and text
            contentLoadingSpinner.style.display = 'flex';
            contentLoadingText.style.display = 'block';
        });
    }
});