CoolFace
Apppublic

william-ai-dev/Seed-Oil-Meta-Engine

sourceHugging Faceupdated 7mo agoView on Hugging Face
0likes
setup.js85 linesDownload Raw Back to public
1// Create loading overlay2function createLoadingOverlay() {3    const overlay = document.createElement('div');4    overlay.id = 'loading-overlay';5    overlay.style.cssText = `6        position: fixed;7        top: 0;8        left: 0;9        width: 100%;10        height: 100%;11        background: rgba(255, 255, 255, 0.05);12        backdrop-filter: blur(3px);13        display: flex;14        align-items: center;15        justify-content: center;16        z-index: 9999;17        flex-direction: column;18        font-family: system-ui, -apple-system, sans-serif;19    `;20    21    const spinner = document.createElement('div');22    spinner.style.cssText = `23        width: 40px;24        height: 40px;25        border: 4px solid rgba(52, 152, 219, 0.3);26        border-top: 4px solid #3498db;27        border-radius: 50%;28        animation: spin 1s linear infinite;29        margin-bottom: 20px;30        background: transparent;31        padding: 8px;32        border-radius: 50%;33    `;34    35    const text = document.createElement('div');36    text.style.cssText = `37        color: #333; 38        font-size: 16px; 39        background: rgba(255, 255, 255, 0.95);40        padding: 12px 24px;41        border-radius: 8px;42        box-shadow: 0 4px 20px rgba(0,0,0,0.15);43        font-weight: 500;44    `;45    text.textContent = "Initializing Research Database...";46    47    overlay.appendChild(spinner);48    overlay.appendChild(text);49    50    // Add animation51    const style = document.createElement('style');52    style.textContent = `53        @keyframes spin {54            0% { transform: rotate(0deg); }55            100% { transform: rotate(360deg); }56        }57    `;58    document.head.appendChild(style);59    60    document.body.appendChild(overlay);61}62 63// Remove loading overlay64function removeLoadingOverlay() {65    const overlay = document.getElementById('loading-overlay');66    if (overlay) {67        overlay.remove();68    }69}70 71// Create overlay immediately72createLoadingOverlay();73 74// Auto-remove after 10 seconds as fallback75setTimeout(() => {76    removeLoadingOverlay();77}, 10000);78 79// Listen for unlock signal (optional, for manual control)80window.addEventListener('message', (event) => {81    if (event.data === 'unlock-input') {82        removeLoadingOverlay();83    }84});85