|
63 | 63 | </script> |
64 | 64 | </head> |
65 | 65 | <body> |
66 | | - <div id="screensaver-container" class="screensaver hidden"> |
67 | | - <img id="screensaver-image1" alt="Screensaver Image" style="opacity: 0;"> |
68 | | - <img id="screensaver-image2" alt="Screensaver Image" style="opacity: 0;"> |
| 66 | + <div id="screensaver-container" class="screensaver hidden"> |
| 67 | + <img id="screensaver-image1" alt="Screensaver Image"> |
| 68 | + <img id="screensaver-image2" alt="Screensaver Image"> |
69 | 69 | <div id="screensaver-thumbnails-wrapper" class="screensaver-thumbnails-wrapper"> |
70 | 70 | <button id="screensaver-thumb-left" class="thumb-nav" aria-label="Scroll thumbnails left">◀</button> |
71 | 71 | <div id="screensaver-thumbnails" class="screensaver-thumbnails"> |
@@ -436,30 +436,28 @@ <h3 class="modal-title">Voice Settings</h3> |
436 | 436 | <h3 class="modal-title">Voice Chat</h3> |
437 | 437 | <button id="voice-chat-modal-close" class="close-btn" title="Close Voice Chat Window">×</button> |
438 | 438 | </div> |
439 | | - <div class="modal-body"> |
440 | | - <img id="voice-chat-image" src="" alt="Conversation Image" style="max-width: 100%; border-radius: 8px;"> |
441 | | - <p>Listening to your voice... Speak naturally, and I'll respond after pauses.</p> |
442 | | - </div> |
| 439 | + <div class="modal-body"> |
| 440 | + <img id="voice-chat-image" src="" alt="Conversation Image"> |
| 441 | + <p>Listening to your voice... Speak naturally, and I'll respond after pauses.</p> |
| 442 | + </div> |
443 | 443 | </div> |
444 | 444 | </div> |
445 | 445 | <script> |
446 | | - function copyToClipboard(text) { |
447 | | - navigator.clipboard.writeText(text).then(() => { |
448 | | - const popup = document.createElement("div"); |
449 | | - popup.textContent = "Address copied. Thank you!"; |
450 | | - popup.style.position = "fixed"; |
451 | | - popup.style.bottom = "20px"; |
452 | | - popup.style.left = "50%"; |
453 | | - popup.style.transform = "translateX(-50%)"; |
454 | | - popup.style.backgroundColor = "rgba(0, 0, 0, 0.8)"; |
455 | | - popup.style.color = "#fff"; |
456 | | - popup.style.padding = "10px 20px"; |
457 | | - popup.style.borderRadius = "5px"; |
458 | | - popup.style.zIndex = "9999"; |
459 | | - document.body.appendChild(popup); |
460 | | - setTimeout(() => { |
461 | | - popup.style.opacity = "0"; |
462 | | - setTimeout(() => popup.remove(), 500); |
| 446 | + function copyToClipboard(text) { |
| 447 | + navigator.clipboard.writeText(text).then(() => { |
| 448 | + const popup = document.createElement("div"); |
| 449 | + popup.textContent = "Address copied. Thank you!"; |
| 450 | + popup.className = "clipboard-popup"; |
| 451 | + const bodyStyles = getComputedStyle(document.body); |
| 452 | + const bgMatch = bodyStyles.backgroundColor.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/); |
| 453 | + popup.style.backgroundColor = bgMatch |
| 454 | + ? `rgba(${bgMatch[1]}, ${bgMatch[2]}, ${bgMatch[3]}, 0.85)` |
| 455 | + : bodyStyles.backgroundColor; |
| 456 | + popup.style.color = bodyStyles.color; |
| 457 | + document.body.appendChild(popup); |
| 458 | + setTimeout(() => { |
| 459 | + popup.style.opacity = "0"; |
| 460 | + setTimeout(() => popup.remove(), 500); |
463 | 461 | }, 2000); |
464 | 462 | }).catch((err) => { |
465 | 463 | console.error("Failed to copy: ", err); |
|
0 commit comments