Spaces:
Running
Running
| document.addEventListener('DOMContentLoaded', () => { | |
| // Initialize tooltips | |
| const tooltipTriggers = document.querySelectorAll('[data-tooltip]'); | |
| tooltipTriggers.forEach(el => { | |
| el.addEventListener('mouseenter', showTooltip); | |
| el.addEventListener('mouseleave', hideTooltip); | |
| }); | |
| // Security status check | |
| checkSecurityStatus(); | |
| }); | |
| function showTooltip(e) { | |
| const tooltipText = e.target.getAttribute('data-tooltip'); | |
| const tooltip = document.createElement('div'); | |
| tooltip.className = 'absolute z-50 px-3 py-2 text-sm bg-gray-800 rounded-md shadow-lg'; | |
| tooltip.textContent = tooltipText; | |
| tooltip.style.top = `${e.clientY + 10}px`; | |
| tooltip.style.left = `${e.clientX + 10}px`; | |
| tooltip.id = 'current-tooltip'; | |
| document.body.appendChild(tooltip); | |
| } | |
| function hideTooltip() { | |
| const tooltip = document.getElementById('current-tooltip'); | |
| if (tooltip) tooltip.remove(); | |
| } | |
| function checkSecurityStatus() { | |
| // In a real app, this would verify cryptographic handshakes | |
| console.log('Security systems nominal - PQC protocols active'); | |
| } |