PageSourceSearch

https://dynamic-salmiakki-095693.netlify.app/test-fancy-ui.js?v=1781614395

js dynamic-salmiakki-095693.netlify.app collected 2026-10-03 10:40:44 UTC 2,066 bytes, 50 lines download raw bytes

1// 🧪 Test function to manually trigger fancy UI with known good data
2async function testFancyUIWithImages() {
3    console.log('🧪 [TEST] Loading test data and triggering fancy UI...');
4    
5    try {
6        // Load test data
7        const response = await fetch('./test-images.json');
8        const testData = await response.json();
9        
10        console.log('🧪 [TEST] Loaded test data:', testData);
11        
12        // Find chat container
13        const chatContainer = document.getElementById('chatContainer') || document.querySelector('.chat-container') || document.body;
14        
15        // Clear any existing fancy UI
16        const existingFancyUI = document.querySelector('.fancy-ui-preview');
17        if (existingFancyUI) {
18            existingFancyUI.remove();
19        }
20        
21        // Prepare data in the expected format
22        const fancyUIData = {
23            wikipediaImages: testData.wikipediaImages,
24            infoboxes: testData.infoboxes,
25            wikipediaData: testData.infoboxes,
26            realtime_facts: [],
27            factsByEntity: {}
28        };
29        
30        console.log('🧪 [TEST] Calling createFancyUIPreview with data:', fancyUIData);
31        
32        // Call the fancy UI function
33        if (typeof window.createFancyUIPreview === 'function') {
34            window.createFancyUIPreview(fancyUIData, chatContainer);
35            console.log('🧪 [TEST] ✅ createFancyUIPreview called successfully');
36        } else {
37            console.error('🧪 [TEST] ❌ createFancyUIPreview function not found');
38        }
39        
40    } catch (error) {
41        console.error('🧪 [TEST] ❌ Error testing fancy UI:', error);
42    }
43}
44
45// 🧪 Manual test function - call testFancyUIWithImages() in console to test
46// Auto-trigger removed to prevent interference with real functionality
47console.log('🧪 [TEST] Test script loaded. Call testFancyUIWithImages() to manually test fancy UI with images.');
48
49// 🧪 Expose test function globally for manual triggering
50window.testFancyUIWithImages = testFancyUIWithImages;

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.