1function showMessage(message, type = 'success') { 2 // Remove existing messages 3 const existingMsg = document.querySelector('.product-message'); 4 if (existingMsg) { 5 existingMsg.remove(); 6 } 7 8 // Map type to Bootstrap alert class 9 const alertType = { 10 'success': 'success', 11 'error': 'danger', 12 'info': 'info', 13 'warning': 'warning' 14 }[type] || 'info'; 15 16 // Create message element 17 const msgDiv = document.createElement('div'); 18 msgDiv.className = `product-message alert alert-${alertType} alert-dismissible fade show`; 19 msgDiv.style.cssText = ` 20 position: fixed; 21 top: 20px; 22 right: 20px; 23 z-index: 9999; 24 min-width: 250px; 25 box-shadow: 0 4px 6px rgba(0,0,0,0.1); 26 `; 27 msgDiv.innerHTML = ` 28 ${message} 29 `; 30 // <button type="button" class="btn-close" data-bs-dismiss="alert"><i class="fa-solid fa-xmark"></i></button> 31 32 33 document.body.appendChild(msgDiv); 34 35 // Auto remove after 3 seconds 36 setTimeout(() => { 37 msgDiv.classList.remove('show'); 38 setTimeout(() => msgDiv.remove(), 150); 39 }, 3000); 40}
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.