import {StrictMode} from 'react'; import {createRoot} from 'react-dom/client'; import App from './App.tsx'; import './index.css'; // Global Classroom Guard: Disable Right-Click, F12, and DevTools inspection shortcuts if (typeof window !== 'undefined') { window.addEventListener( 'contextmenu', (e) => { e.preventDefault(); return false; }, { capture: true, passive: false } ); window.addEventListener( 'keydown', (e) => { const isMac = /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform || navigator.userAgent); const ctrlOrMeta = e.ctrlKey || (isMac && e.metaKey); const key = (e.key || '').toLowerCase(); const code = e.code || ''; const isF12 = key === 'f12' || code === 'F12' || e.keyCode === 123; const isViewSource = ctrlOrMeta && (key === 'u' || code === 'KeyU' || e.keyCode === 85); const isSavePage = ctrlOrMeta && (key === 's' || code === 'KeyS' || e.keyCode === 83); const isDevToolsCombo = (ctrlOrMeta && e.shiftKey && ['i', 'j', 'c', 'k', 'e'].includes(key)) || (isMac && e.metaKey && e.altKey && ['i', 'j', 'c', 'u'].includes(key)); if (isF12 || isViewSource || isSavePage || isDevToolsCombo) { e.preventDefault(); e.stopPropagation(); return false; } }, { capture: true, passive: false } ); } createRoot(document.getElementById('root')!).render( , );