caustino commited on
Commit
b0e18b9
·
verified ·
1 Parent(s): 696ada9

Create script.js

Browse files
Files changed (1) hide show
  1. script.js +32 -0
script.js ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ document.addEventListener('DOMContentLoaded', () => {
2
+ // Initialize tooltips
3
+ const tooltipTriggers = document.querySelectorAll('[data-tooltip]');
4
+ tooltipTriggers.forEach(el => {
5
+ el.addEventListener('mouseenter', showTooltip);
6
+ el.addEventListener('mouseleave', hideTooltip);
7
+ });
8
+
9
+ // Security status check
10
+ checkSecurityStatus();
11
+ });
12
+
13
+ function showTooltip(e) {
14
+ const tooltipText = e.target.getAttribute('data-tooltip');
15
+ const tooltip = document.createElement('div');
16
+ tooltip.className = 'absolute z-50 px-3 py-2 text-sm bg-gray-800 rounded-md shadow-lg';
17
+ tooltip.textContent = tooltipText;
18
+ tooltip.style.top = `${e.clientY + 10}px`;
19
+ tooltip.style.left = `${e.clientX + 10}px`;
20
+ tooltip.id = 'current-tooltip';
21
+ document.body.appendChild(tooltip);
22
+ }
23
+
24
+ function hideTooltip() {
25
+ const tooltip = document.getElementById('current-tooltip');
26
+ if (tooltip) tooltip.remove();
27
+ }
28
+
29
+ function checkSecurityStatus() {
30
+ // In a real app, this would verify cryptographic handshakes
31
+ console.log('Security systems nominal - PQC protocols active');
32
+ }