/* js/security.js - Global Security Script */

// 1. Right Click Disable
document.addEventListener('contextmenu', function(event) {
    event.preventDefault();
});

// 2. Keyboard Shortcuts Disable (F12, Ctrl+U, Ctrl+S, Ctrl+Shift+I, etc.)
document.onkeydown = function(e) {
    
    // F12 (Dev Tools)
    if(e.keyCode == 123) {
        return false;
    }

    // Ctrl+Shift+I (Inspect)
    if(e.ctrlKey && e.shiftKey && e.keyCode == 'I'.charCodeAt(0)) {
        return false;
    }

    // Ctrl+Shift+J (Console)
    if(e.ctrlKey && e.shiftKey && e.keyCode == 'J'.charCodeAt(0)) {
        return false;
    }

    // Ctrl+Shift+C (Element Inspector)
    if(e.ctrlKey && e.shiftKey && e.keyCode == 'C'.charCodeAt(0)) {
        return false;
    }

    // Ctrl+U (View Source)
    if(e.ctrlKey && e.keyCode == 'U'.charCodeAt(0)) {
        return false;
    }

    // Ctrl+S (Save Page)
    if(e.ctrlKey && e.keyCode == 'S'.charCodeAt(0)) {
        return false;
    }
}

// 3. Console Warning (Agar koi somehow khol bhi le)
console.log("%cSTOP!", "color: red; font-size: 50px; font-weight: bold;");
console.log("%cThis is a browser feature intended for developers. Do not paste any code here.", "font-size: 20px;");