|
8 | 8 | * Repository: https://github.com/Amey-Thakur/MATH-SPRINT-GAME |
9 | 9 | * License: MIT |
10 | 10 | */ |
| 11 | + |
| 12 | +// ========================================= |
| 13 | +// CONSOLE EASTER EGG 🏃♂️ |
| 14 | +// ========================================= |
| 15 | +console.log( |
| 16 | + "%c🏃♂️ Math Sprint Game", |
| 17 | + "font-size: 24px; font-weight: bold; color: #8b5cf6; text-shadow: 2px 2px 0 #1e1b4b;" |
| 18 | +); |
| 19 | +console.log( |
| 20 | + "%c➕➖✖️➗ Race against time with math equations!", |
| 21 | + "font-size: 14px; color: #64748b;" |
| 22 | +); |
| 23 | +console.log( |
| 24 | + "%c🎮 Developed by Amey Thakur & Mega Satish", |
| 25 | + "font-size: 12px; color: #22c55e;" |
| 26 | +); |
| 27 | +console.log( |
| 28 | + "%c🔗 https://github.com/Amey-Thakur/MATH-SPRINT-GAME", |
| 29 | + "font-size: 12px; color: #2563eb;" |
| 30 | +); |
| 31 | +console.log( |
| 32 | + "%c⚠️ This game is protected. Please respect the authors' work!", |
| 33 | + "font-size: 12px; color: #f59e0b; font-weight: bold;" |
| 34 | +); |
| 35 | + |
| 36 | +// ========================================= |
| 37 | +// SECURITY MEASURES 🔒 |
| 38 | +// ========================================= |
| 39 | +(function initSecurity() { |
| 40 | + document.addEventListener('contextmenu', function (e) { e.preventDefault(); }); |
| 41 | + document.addEventListener('dragstart', function (e) { e.preventDefault(); }); |
| 42 | + document.addEventListener('selectstart', function (e) { |
| 43 | + if (e.target.tagName !== 'INPUT' && e.target.tagName !== 'TEXTAREA') e.preventDefault(); |
| 44 | + }); |
| 45 | + document.addEventListener('keydown', function (e) { |
| 46 | + if (e.key === 'F12' || (e.ctrlKey && e.shiftKey && ['I', 'J', 'C'].includes(e.key)) || (e.ctrlKey && e.key === 'u')) e.preventDefault(); |
| 47 | + }); |
| 48 | +})(); |
11 | 49 | // Pages |
12 | 50 | const gamePage = document.getElementById('game-page'); |
13 | 51 | const scorePage = document.getElementById('score-page'); |
|
0 commit comments