()
| 2402 | |
| 2403 | // 代码复制成功提示 |
| 2404 | function showCodeCopyNotification() { |
| 2405 | const existing = document.querySelector('.nsn-code-copy-notification'); |
| 2406 | if (existing) existing.remove(); |
| 2407 | const n = createElement('div', { |
| 2408 | className: 'nsn-code-copy-notification', |
| 2409 | style: { |
| 2410 | position: 'absolute', |
| 2411 | bottom: '60px', |
| 2412 | right: '20px', |
| 2413 | background: 'linear-gradient(135deg, #f59e0b, #d97706)', |
| 2414 | color: '#fff', |
| 2415 | padding: '8px 16px', |
| 2416 | borderRadius: '6px', |
| 2417 | fontSize: '12px', |
| 2418 | fontWeight: '500', |
| 2419 | boxShadow: '0 4px 20px rgba(245, 158, 11, 0.3), 0 2px 8px rgba(0, 0, 0, 0.1)', |
| 2420 | zIndex: '1000000001', |
| 2421 | pointerEvents: 'none', |
| 2422 | opacity: '0', |
| 2423 | transform: 'translateY(20px)', |
| 2424 | transition: 'all 0.3s' |
| 2425 | } |
| 2426 | }, ['✓ 已复制到剪贴板']); |
| 2427 | dialog.appendChild(n); |
| 2428 | requestAnimationFrame(() => { |
| 2429 | n.style.opacity = '1'; |
| 2430 | n.style.transform = 'translateY(0)'; |
| 2431 | }); |
| 2432 | setTimeout(() => { |
| 2433 | if (n && n.parentNode) { |
| 2434 | n.style.opacity = '0'; |
| 2435 | n.style.transform = 'translateY(20px)'; |
| 2436 | setTimeout(() => n.parentNode && n.parentNode.removeChild(n), 300); |
| 2437 | } |
| 2438 | }, 2000); |
| 2439 | } |
| 2440 | |
| 2441 | // 代码删除提示 |
| 2442 | function showCodeDeleteNotification() { } |
no test coverage detected