|
554 | 554 | }); |
555 | 555 | } |
556 | 556 |
|
| 557 | + // Konami Code Easter Egg: ↑↑↓↓←→←→BA |
| 558 | + const konamiCode = ['ArrowUp', 'ArrowUp', 'ArrowDown', 'ArrowDown', 'ArrowLeft', 'ArrowRight', 'ArrowLeft', 'ArrowRight', 'KeyB', 'KeyA']; |
| 559 | + let konamiIndex = 0; |
| 560 | + |
| 561 | + document.addEventListener('keydown', (e) => { |
| 562 | + if (e.code === konamiCode[konamiIndex]) { |
| 563 | + konamiIndex++; |
| 564 | + if (konamiIndex === konamiCode.length) { |
| 565 | + konamiIndex = 0; |
| 566 | + triggerEpicExplosion(); |
| 567 | + } |
| 568 | + } else { |
| 569 | + konamiIndex = 0; |
| 570 | + } |
| 571 | + }); |
| 572 | + |
| 573 | + // Epic emoji explosion! |
| 574 | + function triggerEpicExplosion() { |
| 575 | + const emojis = ['🚀', '⭐', '🎮', '💜', '🔥', '✨', '🎯', '💻', '🤖', '🧠', '🎨', '🏆', '👾', '🌟', '💎', '🦄']; |
| 576 | + |
| 577 | + // Screen flash |
| 578 | + const flash = document.createElement('div'); |
| 579 | + flash.style.cssText = ` |
| 580 | + position: fixed; |
| 581 | + inset: 0; |
| 582 | + background: linear-gradient(135deg, #00f5ff, #ff00ff); |
| 583 | + z-index: 9999; |
| 584 | + animation: flashBang 0.5s ease-out forwards; |
| 585 | + `; |
| 586 | + document.body.appendChild(flash); |
| 587 | + setTimeout(() => flash.remove(), 500); |
| 588 | + |
| 589 | + // Add flash animation |
| 590 | + if (!document.getElementById('konami-styles')) { |
| 591 | + const style = document.createElement('style'); |
| 592 | + style.id = 'konami-styles'; |
| 593 | + style.textContent = ` |
| 594 | + @keyframes flashBang { |
| 595 | + 0% { opacity: 1; } |
| 596 | + 100% { opacity: 0; } |
| 597 | + } |
| 598 | + @keyframes emojiExplode { |
| 599 | + 0% { transform: translate(-50%, -50%) scale(0) rotate(0deg); opacity: 1; } |
| 600 | + 50% { opacity: 1; } |
| 601 | + 100% { transform: translate(var(--tx), var(--ty)) scale(1.5) rotate(var(--rot)); opacity: 0; } |
| 602 | + } |
| 603 | + @keyframes epicShake { |
| 604 | + 0%, 100% { transform: translateX(0); } |
| 605 | + 10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); } |
| 606 | + 20%, 40%, 60%, 80% { transform: translateX(10px); } |
| 607 | + } |
| 608 | + `; |
| 609 | + document.head.appendChild(style); |
| 610 | + } |
| 611 | + |
| 612 | + // Shake the page |
| 613 | + document.body.style.animation = 'epicShake 0.5s ease-in-out'; |
| 614 | + setTimeout(() => document.body.style.animation = '', 500); |
| 615 | + |
| 616 | + // Spawn emoji explosion from center |
| 617 | + for (let i = 0; i < 50; i++) { |
| 618 | + setTimeout(() => { |
| 619 | + const emoji = document.createElement('div'); |
| 620 | + const angle = (Math.PI * 2 * i) / 50 + Math.random() * 0.5; |
| 621 | + const distance = 200 + Math.random() * 400; |
| 622 | + const tx = Math.cos(angle) * distance; |
| 623 | + const ty = Math.sin(angle) * distance - 100; |
| 624 | + |
| 625 | + emoji.textContent = emojis[Math.floor(Math.random() * emojis.length)]; |
| 626 | + emoji.style.cssText = ` |
| 627 | + position: fixed; |
| 628 | + left: 50%; |
| 629 | + top: 50%; |
| 630 | + font-size: ${30 + Math.random() * 40}px; |
| 631 | + z-index: 10000; |
| 632 | + pointer-events: none; |
| 633 | + --tx: ${tx}px; |
| 634 | + --ty: ${ty}px; |
| 635 | + --rot: ${Math.random() * 720 - 360}deg; |
| 636 | + animation: emojiExplode 1.5s ease-out forwards; |
| 637 | + `; |
| 638 | + document.body.appendChild(emoji); |
| 639 | + setTimeout(() => emoji.remove(), 1500); |
| 640 | + }, i * 20); |
| 641 | + } |
| 642 | + |
| 643 | + // Multiple confetti bursts |
| 644 | + const burstCount = 5; |
| 645 | + for (let i = 0; i < burstCount; i++) { |
| 646 | + setTimeout(() => { |
| 647 | + confetti({ |
| 648 | + particleCount: 100, |
| 649 | + spread: 360, |
| 650 | + origin: { x: Math.random(), y: Math.random() * 0.5 + 0.25 }, |
| 651 | + colors: ['#00f5ff', '#ff00ff', '#b366ff', '#00ff88', '#ffff00', '#ff6b6b'], |
| 652 | + ticks: 300, |
| 653 | + gravity: 0.8, |
| 654 | + scalar: 1.2 |
| 655 | + }); |
| 656 | + }, i * 200); |
| 657 | + } |
| 658 | + |
| 659 | + // Console message |
| 660 | + console.log('%c🎮 KONAMI CODE ACTIVATED! 🎮', 'font-size: 24px; color: #ff00ff; text-shadow: 0 0 10px #00f5ff;'); |
| 661 | + console.log('%c↑↑↓↓←→←→BA', 'font-size: 16px; color: #00f5ff;'); |
| 662 | + } |
| 663 | + |
557 | 664 | // Base URL for fetching markdown from GitHub |
558 | 665 | const GITHUB_RAW_BASE = 'https://raw.githubusercontent.com/dotnet-presentations/vscode-github-copilot-agent-lab/main/.lab/'; |
559 | 666 |
|
|
0 commit comments