| 70 | |
| 71 | // Der sichtbare Mauszeiger. |
| 72 | const mountCursor = () => { |
| 73 | if (document.getElementById('probe-cursor')) return; |
| 74 | const dot = document.createElement('div'); |
| 75 | dot.id = 'probe-cursor'; |
| 76 | dot.style.cssText = 'position:fixed;left:-100px;top:-100px;width:22px;height:22px;margin:-11px 0 0 -11px;' |
| 77 | + 'border:2px solid #ff3b6b;border-radius:50%;box-shadow:0 0 0 2px rgba(0,0,0,.6);pointer-events:none;z-index:2147483647;'; |
| 78 | const cross = document.createElement('div'); |
| 79 | cross.style.cssText = 'position:absolute;left:9px;top:9px;width:4px;height:4px;background:#ff3b6b;border-radius:50%;'; |
| 80 | dot.appendChild(cross); |
| 81 | document.documentElement.appendChild(dot); |
| 82 | document.addEventListener('mousemove', (event) => { |
| 83 | dot.style.left = `${event.clientX}px`; |
| 84 | dot.style.top = `${event.clientY}px`; |
| 85 | }, true); |
| 86 | }; |
| 87 | if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', mountCursor); |
| 88 | else mountCursor(); |
| 89 | |