1 2// trojan-insights.js 3document.addEventListener('DOMContentLoaded', () => { 4 fetch('/saas-trojan-matrix.json') 5 .then(response => response.json()) 6 .then(data => { 7 const container = document.getElementById('trojan-insights-container'); 8 if (!container) return; 9 10 // Take the first few categories or items for a preview 11 const sampleData = data.slice(0, 2); 12 13 container.innerHTML = ` 14 <div class="grid md:grid-cols-2 gap-8 mt-12"> 15 ${sampleData.map(category => ` 16 <div class="p-6 bg-white border border-[#E5E7EB] rounded-xl"> 17 <h3 class="text-lg font-bold text-[#111827] mb-4">${category.title}</h3> 18 <ul class="space-y-2 text-sm text-[#4B5563]"> 19 ${category.sentences.slice(0, 5).map(s => `<li>⢠${s}</li>`).join('')} 20 </ul> 21 </div> 22 `).join('')} 23 </div> 24 `; 25 }) 26 .catch(err => console.error('Error loading trojan insights:', err)); 27});
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.